The 1.django MTV model
The mapping of the path of the Url:url to the view function.
Views: Logic Processing
Models: Operations related to the database
Template: An operation associated with an HTML file.
2. Download a Jango
Execute the following command under Python's path
Pip Install Django
Django-admin program is generated under Python's scripts directory after installation is complete
Adding django-admin to an environment variable
3. Create a Django Project
Django-admin Startproject MySite
Once created, a MySite project directory is generated in the current directory with the following directory structure:
Settings: Configuring
URLs: Mapping relationships between paths and views
WSGI: Creating Sockets (parsing, encapsulating data process)
4. Create an app in the MySite directory
Python manage.py Startapp App1
When created, a APP1 is generated in the MySite directory, and the directory structure is as follows:
Views: Storing View functions
Models: Working with databases
5. Start a Django Project
python manage.py runserver 8080 不加端口默认8000
Python----Django