参考:
点击打开链接
点击打开链接
cd进入指定文件夹
django-admin.py startproject mysite 新建项目
cd进入项目文件夹
python3 manage.py runserver 127.0.0.1:8888(端口号可自己设置)
浏览器地址栏输入:http://127.0.0.1:8888 看是否出来django页面

python3 manage.py startapp aaa 创建应用
-------------------------------------------------------------------------------------------------------------------------------------------------
在项目的settings.py文件 INSTALLED_APPS 中插入 app名 ,如 booktest 是我的app名
生成迁移: python3 manage.py makemigrations (全局迁移)
python3 manage.py makemigrations booktest(对booktest做迁移)
在app的migrations下会生成一个 0001_initial.py 文件
执行迁移:python3 manage.py migrate
shell: