django报错"doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS."的解决办法
报错原因:
1.settings文件中没有注册app
2.如果注册了,就是django没有识别出来
解决办法:
1.注册app
2.导入models时使用绝对导入
将相对导入方式:
from .models import 表名
改为:
from app.models import 表名
将相对导入方式:
from .models import 表名
改为:
from app.models import 表名