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.错误的导入方式如下:

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

 

2.正确的导入方式:

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

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

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

 

相关文章:

  • 2022-12-23
  • 2021-05-01
  • 2021-06-04
  • 2021-12-04
  • 2021-11-02
  • 2022-12-23
  • 2021-09-26
  • 2021-12-20
猜你喜欢
  • 2022-02-21
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案