Official website: https://www.djangoproject.com/download/
1. Simple method:
A, Pip command installation methodpip install Django
Open DOS Command Window
Enter the command and the toolkit will go to GitHub to download
B, manual installation (website download)
Download the package labeled right. Unzip, here I put Python and Django together.
Open DOS into the Django directory
Enter the installation command:
The entire installation will copy all the necessary files to Python35
At this point we need to be equipped with an environment variable, so that we can execute the command, if not worthy of execution, but to open a command to the directory location of the file can be, so to facilitate
Let's match the environment variables:
We add the above path to path, Note: There is a semicolon between each path
Next we can test whether it is successful;
I built a project folder under the Python folder to make it clearer
The following django-admin startproject MySite is a command to create a project;
After execution, a project called MySite is created under the file, so our Python and Django are all installed!
Note: Django-admin is a shorthand, it performs the configuration we just
The previous wording is django-admin.py startproject MySite but this folder does not have django-admin.py, but in the following directory there are:
What is the difference between the two?
Let's look at the code:
We can see that django-admin.py is a command management execution,
But in the django-admin-script.py we can roughly see the meaning of the Code, program execution of the entrance of this executable program called Django-admin, this should be called Django-admin.exe
Where is this file? Of course it is relative to its own path:
Python tutorial Django (ii)