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:如有大神知道原因请告知,不胜感谢!
RuntimeError: Model class app_anme.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.---python学习错误记录的更多相关文章
- Django RuntimeError: Model class app_anme.models.Ad doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.报错
报错内容 RuntimeError: Model class app_anme.models.Ad doesn't declare an explicit app_label and isn't in ...
- RuntimeError: Model class users.models.UserProfile doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Django启动的时候报错 File "/home/hehecat/PycharmProjects/MxShop/MxShop/urls.py", line 23, in from ...
- RuntimeError: Model class user.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Django 2.x版本迁移数据库报这个错误,user表使用的Django的验证系统 本来就想改一下用户表的表名,莫名的报了个这个错误,在网上找到了解决办法 打开user应用模块下的apps.py文件 ...
- RuntimeError: Model class myapp.models.Test doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
没有添加子应用在settings里面!
- Django开发BUG "Model class WH_auth.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS."
当进行数据库迁移的时候发生问题,报错如下:RuntimeError: Model class WH_auth.models.User doesn't declare an explicit app_l ...
- django.db.utils.ProgrammingError: (1146, "Table 'db_gold.user_ip_info' doesn't exist") RuntimeError: Model class scanhosts.models.HostLoginInfo doesn't declare an explicit app_label and isn't in an a
Error Msg 创建了一个apps的目录将所有app放入apps文件中, 将apps路径加入sys.path中:sys.insert(0, os.path.join(BASE_DIR, " ...
- RuntimeError: Model class apps.users.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
报错代码: File "/home/bsodgm/Desktop/Django_projection/mall/apps/users/views.py", line 9, in & ...
- Model class apps.goods.models.GoodsType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS
在admin.py注册这个model时,报了个错: RuntimeError: Model class apps.goods.models.GoodsType doesn't declare an e ...
- 在views中引用UserProfile报错RuntimeError: Model class apps.users.models.UserProfile doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
如图报错,在settings中,该加的也加了啊! 显然类似于网上最容易遇到的解决方案如下图,是没有任何意义的 只要在view中有 from .models import UserProfile,Ver ...
随机推荐
- datasnap 的HTTP 调用返回JSON
datasnap 相关设置,就不细说了,直接上函数 uses System.JSON function TServerMethods.Updatehello: Tjsonobject; var tem ...
- Prometheus监控学习笔记之Prometheus 2.0 告警规则介绍
0x00 变化 Prometheus 2.0 已经发布一段时间了,从今天开始我将分几篇文章为大家介绍其中的一些变化. 此篇文章主要介绍 2.0 的告警规则声明的新写法. 从 1.x 到 2.0 规则声 ...
- linux之添加切换用户、系统变量、selinux、防火墙、系统中文乱码的讲解
######linux用户分类1.root 用户 linux皇帝 2.普通用户 贫民百姓 [root@oldboyedu-01 oldboy]# useradd oldboy[root@oldboye ...
- Java第一、二次实训作业
1.有1.2.3.4共4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 程序分析:可填在百位.十位.个位的数字都是1.2.3.4.组成所有的排列后再去掉不满足条件的排列. 代码 pack ...
- ERROR internal error: process exited while connecting to monitor
centos7.4 创建kvm虚拟机时报错 问题: [root@oldboy ~]# virt-install --virt-type kvm --os-type=linux --os-variant ...
- HTML与CSS的一些知识(四)
续: line-height 用于设置一行文本行高,一般用于文本的垂直居中: display 用于设置元素的显示方式 float 浮动,让元素漂浮起来排列 浮动的影响: a.浮动后,行内元素可以支持宽 ...
- Git 与 GitHub 简介
Git 与 GitHub 的来历 Linux 之父 Linus 在 1991 年创建开源的 Linux 操作系统之后,多年来依靠全世界广大热心志愿者的共同建设,经过长足发展,现已成为世界上最大的服务器 ...
- struts.xml,报错 1 c.opensymphony.xwork2.util.DomHelper
ERROR c.opensymphony.xwork2.util.DomHelper - The content of element type "action" must mat ...
- Unity3d外包公司|UE4外包公司:谷歌首款Daydream VR设备上手
这款售价仅为79美元(约合人民币525元)的产品内含“够用”的手柄和一台头戴设备,只要你有一台支持月日,10月5日,dream平台的手机(未来将成为安卓平台的标配),就能体验VR的乐趣. 即使该产品最 ...
- java非阻塞NIO和阻塞IO
1 非阻塞NIO和阻塞IO 1.1 定义 阻塞IO:线程被阻塞,去处理一个读取和写入,中间如果有等待时间,则线程被占用,也不能处理其他任务: 非阻塞IO(new I ...