django启动服务时报错:RuntimeError: Model class index.models.User doesn't declare an explicit app_label and isn't in an application in 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.

解决方法:

  我是这样解决的:

  检查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.

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

时间: 2024-11-10 15:59:48

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

Django 使用allauth报错 RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS

一:报错 RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS 出现这种情况需将Django的Sites框架添加到您的应用程序中,并在您的设置中将SITE_ID设置为1即可.位置放在默认配置的后面,其他应用的前面. INSTALLED_APPS = [ 'django

添加tomcat开机启动服务时报错:Neither the JAVA_HOME nor the JRE_HOME enviromment variable is defined

首先,参考的 https://blog.csdn.net/wabil/article/details/78818249 的方式添加 tomcat 开机启动,这种方式不需要添加 setenv.sh 文件,轻量级,非常方便,具体方式如下: 1. 创建一个服务文件 vim /lib/systemd/system/tomcat.service 复制如下内容,修改后保存: [Unit]Description=tomcatAfter=network.target [Service]Type=oneshotE

【原创】大叔经验分享(57)hue启动coordinator时报错

hue启动coordinator时报错,页面返回undefinied错误框: 后台日志报错: runcpserver.log [13/May/2019 04:34:55 -0700] middleware INFO Processing exception: 'NoneType' object has no attribute 'is_superuser': Traceback (most recent call last): File "/opt/cloudera/parcels/CDH-5.

Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to address [::]:80

1. 启动 Apache 时报错: [[email protected] sh]# service httpd start Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName (98)Address already in use: make_sock: could not bi

ceph升级到10.2.3 版本启动服务报错:Unknown lvalue 'TasksMax' in section 'Service'

#### ceph软件包升级完成,执行命令重启服务 sudo systemctl restart [email protected]"$HOSTNAME" #### 故障现象 服务可以启动,启动后显示有报错信息: Nov 23 17:14:45 ceph-6-12 systemd[1]:        [/usr/lib/systemd/system/[email protected]:18] Unknown lvalue 'TasksMax' in section 'Service'

MyEclipse 启动tomcat时报错:Cannot change deployment state from ERROR to REDEPLOYING.ds

myeclipse 启动tomcat时报错:Cannot change deployment state from ERROR to REDEPLOYING.ds - 刘琦的专栏 - 博客频道 - CSDN.NET http://blog.csdn.net/u012922219/article/details/42869361   错误 : 无改将部署状态从"错误"变成"重新部署"状态. 解决办法: 右击"项目名" –> MyEclipse

启动elasticsearch时报错:./elasticsearch-env: 第 81 行: cd: /etc/elasticsearch: 权限不够或其他权限问题

启动elasticsearch时报错:./elasticsearch-env: 第 81 行: cd: /etc/elasticsearch: 权限不够 切换到root下启动也不行 把这个文件夹添加到普通用户组 cd /etc sudo chown -R xuelianchen elasticsearch/ 再启动,又报另一个权限问题的错 再重复一遍添加用户组 cd /var/log sudo chown -R xuelianchen elasticsearch/ 再启动,这就成功了 PS:大概

ifup em2启动网卡时报错:connection activation failed

环境:centos7,重启网络,报以下错误: ifup em2     ##启动em2网卡时报错 Error: Connection activation failed: The connection is not for this device. 解决方法: systemctl stop NetworkManager.service systemctl disable NetworkManager 再启动过em2网卡,就可以了 ifup em2 原文地址:http://blog.51cto.c

COGNOS10启动服务报错 问题解决

今天安装了在我的机器上(WIN7 64位)安装了COGNOS 10.2, 然后进入configuration各种测试都通过了,但是启动服务的时候一直不成功(具体错误没有记录下来...) 后来我按网上帖子的意见,把以前安装的JAVA全卸载了,然后重装了一遍Cognos BI Server 10.2 64Bit, 之后用COGNOS自带的jre设置了JAVA_HOME变量: JAVA_HOME: C:\Program Files\ibm\cognos\c10_64\bin64\jre\6.0 之后启