Django项目虚拟环境搭建: mkvirtualenv AiXianFengEnvs
Django项目工程创建: django-admin startproject AiXianFeng
Django虚拟环境模块: pip freeze > requirements.txt
创建项目app应用: python manage.py startapp axf
- 创建数据库:
create database aixianfeng default charset=utf8;
- 生成迁移文件:
python manage.py makemigrations
- 执行迁移文件:
python manage.py migrate
Django项目启动: python manage.py runserver 127.0.0.1:80000