RuntimeError: Model class app_anme.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.---python学习错误记录

untimeError: Model class app_anme.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

关于django错误的导入错误

1.错误的导入方式如下:

2.正确的导入方式:

只有使用users.models的导入方式才能导入成功,使用绝对路径也不行。

ps:如有大神知道原因请告知,不胜感谢!

猜你喜欢

转载自www.cnblogs.com/liuguangbiao/p/9272039.html