[Django practice] Part 1-Overview

Source: Internet
Author: User
Tags install django

I want to write [Django practice] this series of articles because I recently developed a database script publishing system, which is only used within the company. Its functions are very simple and clear: the developer submits SQL statements through the system, and the DBA reviews the statements and sends the results to the developer. Of course, there are many ways to develop such a small system. I chose Django + Bootstrap. I chose Django for the Web framework because I am familiar with the Python language and often use it to write some automated scripts; the frontend framework chooses Bootstrap because I like it very much. This series of practical articles will record the process of developing this system in detail, including the design and source code. Because I used Django for the first time, it is inevitable that there will be bugs and errors. Please give me more advice. The following describes how to install Django + Bootstrap. Before installing Django, you must have installed Python on the system. As for how to install Python, I will not talk about it here, if you are interested, refer to [Python] installation and environment configuration I wrote earlier. The Python version I selected is 2.7.3. We recommend that you do not use Python 3 here, python 3 has made major changes and is not yet stable. The most important thing is that many APIs have been changed and may not be compatible with the old version. After installing Python, we recommend that you install easy_install, so that you can directly use the command easy_install django to download the latest version, which is very convenient. Of course, you can also download the tar.gz file first, then: tar xzvf Django-1.5.2.tar.gzcd python setup. py install django-bootstrap-toolkit install the Bootstrap interface style. You can go to the Bootstrap homepage and check it. I personally like this little fresh style, dyve has developed the open-source software package django-bootstrap-toolkit. You can download the toolkit from github. By the way, Baidu cannot find django bootstrap in Baidu, but it is the first google search, so we should use google for technology-related things. After the Django project Django is successfully installed, you can use the django-admin.py to create a project: [python] view plaincopyprint? # Django-admin.py startproject dbrelease is my name for this project. After the project is successfully created, we need to create an application: [python] view plaincopyprint? # Python manage. py startapp dbrelease_app and then add the 'dbrelease _ app' application to INSTALLED_APPS in settings. py. Now let's run the Web server: [python] view plaincopyprint? # Python manage. py runserver 192.168.1.16: 8000 enter http: // 192.168.1.16: 8000/in the browser to see the Django light blue welcome interface, because it is still an empty project, nothing except the welcome interface, the next step is to enrich the page content. To use bootstrap in a newly created Django project, we need to copy the folder bootstrap_toolkit to the main folder of the project, and in settings. add the 'bootstrap _ toolkit 'application to INSTALLED_APPS In The py file. Reference: Django official documentation The Django BookBootstarp

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.