1. First we want to download Python and Django, and they are as follows
Python Address: https://www.python.org/
Django Address: https://www.djangoproject.com/
2. Install the Python environment first before you install Django.
A. After downloading the Python installation package, click Next (Next)
B. Configuring Python environment variables
C. Test whether the Python installation was successful, cmd open command line Input python command, if that is successful
3. Start installing Django and we'll use cmd when we install Django. Under the cmd Command window, go to the Django decompression directory with the CD command and locate the setup.py file.
4. Install Django using the Python setup.py installation. Wait for the installation to complete.
5. After the installation is complete, check that there are no errors.
6. Run Python, import Django,import Django and django.version to see if there is a successful installation. If there is a successful installation, the version will be displayed.
7. Configure the Django environment variable, C:\Python27\Lib\site-packages\Django-1.7.11-py2.7.egg\django\bin path, to invoke when executing django-admin.py ( Personal understanding )
8. Create the project. The command is django-admin.py startproject ProjectName projectname is the project name (not executed on the Python command line). This article was built under the F-plate
For example:
9. When the project is created successfully, the directory structure
start the built-in service: You need to enter it under the project folder: Python manage.py runserver. As
11. Verify that if you enter http://127.0.0.1:8000/in the browser, you can see the.
The first Python + Django development environment is ready to run.
Legacy issues?
1. Each time you create a project port number is 8000, how to set the port number, how to shut down the running port number?
Installation of Python and Django in window environment, and creation of projects