Previous steps:
Download Python,django and install the Python interpreter as well as the Django module.
The overall steps are described:
Create a Django Project
Step one: Go to the installed Python directory
Step Two: Enter the command to create the project:
Create a Business App Catalog
Step One: Enter the project catalog that has been created
Step Two: Enter Create app project name
To create a Django project:
1. Go to the Scripts directory in the installed Python directory
2. In the empty space of this folder SHIFT + right mouse button , open the command window here
3. Under this window, enter:
1 django-admin startproject Test (project name)
then enter.
At this point in the directory more than a file, this file is the creation of the project directory.
Expand:
The project document consists of four important documents:
File composition:
#######################################################
Test1
-test1 #对整个程序进行配置
-init
-setting #配置文件
-url #url对应关系
-wsgi #遵循wsig规范, Uwsgi + Niginx
-manage.py #管理django程序
#######################################################
Create a Django Engineering app:
In the new project catalog
Under the command bed type:
Python manage.py Startapp app1 (app name)
At this point, you can see that the App1 file in the file has been created.
Django Learning Handbook-creating Django Projects and apps