在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,VerifyCode
一运行项目就会报错!怎么破?
其实很简单,只要在views中这样写就可以了。
from users.models import UserProfile,VerifyCode
再运行一下项目,是不是就不报错,可以正常使用啦?
在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.的更多相关文章
- 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 & ...
- 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 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 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 ...
- RuntimeError: Model class myapp.models.Test doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
没有添加子应用在settings里面!
- 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 ...
- 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, " ...
- 在maven项目中引用ueditor报错问题
遇到的问题:将pom.xml中引入 <dependency> <groupId>com.baidu</groupId> <artifactId>uedi ...
- discuzx3.1中引用 Jquery报错的解决办法
我们可以引用jQuery给JQ赋予一个变量var jq = jQuery.noConflict(); 修改成为:<script type="text/javascript"& ...
随机推荐
- Codeforces 1154C Gourmet Cat
题目链接:http://codeforces.com/problemset/problem/1154/C 题目大意: 主人有一只猫.周一&周四&周日:吃鱼周二&周六:吃兔子周三 ...
- 安装splash
参考: https://blog.csdn.net/qq_41020281/article/details/82599075
- MyCat数据库中间件 - 分库
MyCat MyCat用于解耦分布式数据库与java,比如分库分表以后,需要查询某条数据时,需要java根据需要查的数据先计算去哪个库查,然而有了Mycat就不用自己计算怎么存储,怎么查询了.MyCa ...
- Spring Boot基础:Spring Boot简介与快速搭建(1)
1. Spring Boot简介 Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化Spring应用的创建.运行.调试.部署等. Spring Boot默认使用tomca ...
- python数据结构与算法第三天【时间复杂度计算方法】
最优时间复杂度(不可靠) 最坏时间复杂度(保证) 平均时间复杂度(平均状况) 不同语句的时间复杂度: (1)顺序语句:使用加法 (2)循环语句:使用乘法 (3)分支语句:使用坏时间复杂度 例如:如下代 ...
- 数据驱动-参数化(Parameters)
在录制程序运行的过程中,Vugen(脚本生成器)自动生成了脚本以及录制过程中实际用到的数据.在这个时候,脚本和数据是混在一起的. 在登录操作中,很明显xpj与123123是填入的数据,如果Contro ...
- DBExpress动态连接SQL-Server
procedure TForm1.Button1Click(Sender: TObject);var theCNN : TSQLConnection;//定义连接,要引用 DB, SqlExprbe ...
- hdu-1058(map)
题意:输出第n个能拆分成由,2,3,5,7中的一个或者多个组成的数: 解题思路:a[i+1]=a[i]*2;a[i+2]=a[i]*3;a[i+3]=a[i]*5;a[i+4]=a[i]*7;然后把重 ...
- 法语Linux NuTyX 11 RC2 发布
读 NuTyX是一个法语Linux发行版(具有多语言支持),由Linux From Scratch和Beyond Linux From Scratch构建,带有一个名为“cards”的自定义包管理器. ...
- fiddler软件测试——Fiddler抓取https设置详解(图文)
强烈推荐(原创亲测)!!!Fiddler抓取https设置详解(图文)转 本文主要说明了自己在设置fiddler抓取https过程中所遇到的问题及解决步骤,特别是fiddler在设置证书的环节遇到的各 ...