1.django命令方式创建项目
#1.创建django项目 django-admin startproject ssz_django
wangxiaoyudeMacBook-Pro:day18 wangxiaoyu$ pwd /Users/wangxiaoyu/PycharmProjects/python_automated_development/yzh/day18 wangxiaoyudeMacBook-Pro:day18 wangxiaoyu$ ls sky ssz_django wangxiaoyudeMacBook-Pro:day18 wangxiaoyu$ django-admin startproject kay wangxiaoyudeMacBook-Pro:day18 wangxiaoyu$ ls kay sky ssz_django
python manage.py runserver 127.0.0.1:8002 #3.项目中创建子应用 python manage.py startapp app_name #4.生成表结构 python manage.py makemigrations #5.同步表结构到数据库 python manage.py migrate
原文:https://www.cnblogs.com/xyxts/p/13510696.html