1. Need to install Python and Django environment, installation of Python environment I'm not going to say more.
2. Installing the Framework Django
Django installation, it is recommended to install a PIP bar, Easyinstall can also, and then the terminal input:
Pip Install Django
I use the installation method is WHL installation, recommended a Wheel installation library: https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml python wheel Installation Library
Open the above URL directly Ctrl + F search Django is out and then click Download
3. Locate the download path for the file, enter pip install DJANGO?1.11.8?PY2.PY3?NONE?ANY.WHL in the terminal, and note that the file name after install is the same as the downloaded filename
4. Test whether the installation is successful, under Terminal:
Python
Import Django
Django. VERSION If the interface appears, the installation is successful
5. Start Building Services
1) Create a project
Find a file directory as a workspace, with the terminal into the current directory, in the terminal input: django-admin.py startproject show_goods, note show_goods for their own project name
This is the directory structure that I created after the completion:
2) Open the settings.py file, configure the local language and the time (this step can be omitted)
6. Test if Django can open the service successfully
The terminal command is as follows: Python manage.py Runserver Open port is 8000 by default
If the port is occupied, we can enter: Python manage.py runserver 8001
If it appears, open the Address access page and the Welcome screen will appear to run successfully
The above is the successful interface, the basic configuration service is over.
The Django infrastructure service for Python web framework