- 通过pip 自动生成相关依赖(新增依赖模块时,需要在工程根目录下再次执行该命令)
pip freeze > requirement.txt
- 安装依赖
pip install -r requirements.txt
- 升级依赖到最新
pip install pur
pur -r requirements.txt
python -m django --version
django-admin startproject mysite
python manage.py runserver
python manage.py startapp app
python manage.py migrate
python manage.py createsuperuser