This article introduces how to use python to install django and create a project
The examples introduced below It is performed under python2.7. The operation of python3. Install django
, "1.10.3" is the version number of django##After successful installation, you will see the django_admin.exe file in the directory as shown below
View django version
##Configure environment
VariablesAdd the python path and django path to the system environment variables respectively
D:\Python27D:\ Python27\Lib\site-packages\django\bin
After creation, open NsDs. Here is a brief introduction to the directory (refer to the novice tutorial)
|-- NsDs| |-- init.py| |-- settings.py| |-- urls.py| |-- wsgi.py-- manage.py
A practical command line tool that allows you to interact with the Django project in various ways.
NsDs/
init.pyNsDs/
settings.pyNsDs/
urls.py.
Portal to a WSGI-compatible web server to run your project. Check the commands provided by manage
#Start the service: use the runserver command, the default address is "127.0.0.1:8000 "
You can also specify the address
python manage.py runserver 127.0.0.1:8001
The above is the detailed content of How to install django and create a project using python. For more information, please follow other related articles on the PHP Chinese website!