1、子路由创建在migrations文件中
会报错:
应该创建在项目目录下和migrations文件同级
2、pycharm中的py文件无法编译,勾选掉。
3、项目无法启动:勾选掉
4、pycharm,没有版本控制,找到上方菜单的VCS → VCS Operations Popup,即可。选中,打开项目。
5、启动项目:
6、
执行python manage.py makegrations interfaces 报错
输入1 再输入1
7、
执行python manage.py migrate报错:
sqlite3.IntegrityError: UNIQUE constraint failed: new__tb_project.id
The above exception was the direct cause of the following exception:
解决:把migrations中的除了__init__文件全部删除,重新执行迁移命令即可。
命令:makemigrations
命令:migrate
查看数据库,两张数据库表都有了。