mkdir mysitecd Mysitedjango-admin.py startproject MySite
Execute the above command to get the content:
mysite/ manage.py mysite/ __init__. py setting.py urls.py wsgi.py
1. The name of the external MySite folder can be changed arbitrarily.
2. manage.py file, this file will be automatically created in the Django project, it can do the same thing as django-admin, it can also add the path of the package in your project to the Sys.path file, and set the Django_settings_ The module environment variable points to the setting.py file in your project.
3, the internal MySite folder is a practical use, you need to use this name to import the content (import).
4. __init__.py file, this file is to tell the Python interpreter that this is a Python package.
5, setting.py file, is used to set/Configure your Django project.
6. urls.py file, a declaration of the URL of the Django project. The directory for the Django project.
7. wsgi.py file, (Wsgi:python Web Server Gateway Interface) is a pointcut for WSGI compatible Web Server service projects.
First Django app (individual files and folder resolution)