Django is a Python Web development framework, the following is a description of the installation steps under windows,
On the environment is Win10, Windows Server is the same
Here are the steps of finishing, you can also refer to the official tutorial
(1) install Python , this is directly from the official website to download the installation on the line, install the latest version on the line
(2) Installation pip
Open a command line, run the following command to install the latest version pip
https://bootstrap.pypa.io/get-pip.py -o get-pip.py curl python get-pip.py
pip update command
python -m pip install -U pip
(3) Installation virtualenv
Open a command line, run the following command
python -m pip install virtualenvwrapper-win
(4) Create a working directory for the site to be developed, assuming that the project name is test
Enter on the command line to the directory, then run the following command to create a virtual test environment
python -m virtualenv test
You need to run in the same directory After you create a virtual environment following command to activate
test\Scripts\Active
Note that here the test and the name of the above names are the same virtual environment
Stop running a virtual environment can run the following command after activation
test\Scripts\Deactive
(5) installed Django, run the following command in the virtual environment activation above
python -m pip install django
Create a project, the following command line to create a test_project project called (do not miss the last point)
django-admin.py startproject test_project .
(6) is to test whether the normal use
python manage.py runserver
Open your browser and enter the following address to see whether the normal access
http://127.0.0.1:8000/
The default is port 8000, if already occupied, the following is a way to specify the port number
python manage.py runserver 8001
(7) to create a database for use Django (SQLite)
python manage.py migrate
We can see more than a catalog file db.sqlite3
carry out! ! !
The next chapter I will introduce the practical application