I. References
1. Django Book
2. Google & Baidu & django official website documentation
2. Introduction to Django
1. History
Baidu .......
2. Features
3. MVC design mode
The biggest feature of django's mvc development model is loose integration.
Iv. Django Installation
1. installation steps:
Baidu or blog
2. Note
(1). Django requires Python 2.3 or later.
(2). Python may be pre-installed in Linux or Mac OS X.
(3) Django hosts three database engines: PostgreSQL/MySQL/SQLite 3
3. Check whether the installation is successful.
If you enter the preceding command and the version information is displayed successfully, the installation is successful.
5. Django initial experience
If you use setup. py tool to install Django, The django-admin.py has been added to the system path, because we often use, so it is recommended to add to the system search path, for Windows, change the PATH environment variable (which is included in the Python and Django installation tutorials)
1. Project Process
(1) Open DOS, You can manually create a folder or enter the doscommand (mkdir)
(2) enter the django-admin.py startproject mysite to create a mysite project in the current directory, which contains:
_ Init _. py: Let Python treat this directory as a file required by an Development Kit (that is, a group of modules ).
Manage. py: a command line tool that interacts with django projects in multiple ways
Settings. py: Configuration tool for this Django Project
Urls. py: URL declaration of this Django Project
(3) Start the built-in Django web Server
Enter the manage. py runserver command in the current directory to start
(4) view in the browser
Enter 127.0.0.1: 8000 to see the page "It Worked"
2. Change host or port
The default port is port 8000, and only the local connection can be monitored. The change can be as follows:
You can also change the IP address of the server listener so that django can listen to all network interfaces, so that other computers can connect to the server.