码迷,mamicode.com
首页 > 移动开发 > 详细

django启动服务时报错:RuntimeError: Model class index.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

时间:2018-10-20 11:00:41      阅读:2037      评论:0      收藏:0      [点我收藏+]

标签:启动服务   user   runtime   cat   错误   explicit   没有   应用   time   

 

在django框架中用命令启动服务时报如下错误:

  RuntimeError: Model class index.models.User doesn‘t declare an explicit app_label and isn‘t in an application in INSTALLED_APPS.

解决方法:

  我是这样解决的:

  检查setting.py里面的INSTALLED_APPS,发现应用没有注册。把应用注册之后,重启服务就好了

  其它解决方法,以后遇到了再补充。

 

django启动服务时报错:RuntimeError: Model class index.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

标签:启动服务   user   runtime   cat   错误   explicit   没有   应用   time   

原文地址:https://www.cnblogs.com/longyuu/p/9820889.html

(3)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!