在models.py中定义模型类
生成迁移
python manage.py makemigrations
执行迁移
python manage.py migrate
(2)超级管理员用户
创建用户
python manage.py createsuperuser
注册模型类
登录后台管理数据
视图配置urlsviews.py中定义视图 定义templates
在当前文件夹下定义templates文件夹,在templates文件夹下定义项目同名文件夹,在文件夹中创建响应显示视图的html文件。
配置settings文件
编辑模板文件
在视图中调用
return render(request, '*.html',context)



