pip install Django
python3 -m django --version
django-admin startproject siteName
python -m manage.py startapp poll
/*
siteName-----------------django项目根目录,不会影响django项目
manage.py------------命令行工具,用于django项目交互<vhttps://docs.djangoproject.com/en/3.2/ref/django-admin/>
siteName-------------项目真正的python包目录
__init__.py------告诉python,当前目录是一个python包
settings.py------django项目配置文件<https://docs.djangoproject.com/en/3.2/topics/settings/>
urls.py----------django项目的URL声明文件<https://docs.djangoproject.com/en/3.2/topics/http/urls/>
asgi.py----------An entry-point for ASGI-compatible web servers to serve your project<https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/>
wsgi.py----------An entry-point for WSGI-compatible web servers to serve your project<https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/>
*/
python3 manage.py runserver
指定端口:python3 manage.py runserver 8080
An app is a Web application that does something – e.g., a Weblog system, a database of public records or a small poll app. A project is a collection of configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects.