如图报错,在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.的更多相关文章

  1. 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 & ...

  2. 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 ...

  3. 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文件 ...

  4. 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 ...

  5. RuntimeError: Model class myapp.models.Test doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

    没有添加子应用在settings里面!

  6. 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 ...

  7. 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, " ...

  8. 在maven项目中引用ueditor报错问题

    遇到的问题:将pom.xml中引入 <dependency> <groupId>com.baidu</groupId> <artifactId>uedi ...

  9. discuzx3.1中引用 Jquery报错的解决办法

    我们可以引用jQuery给JQ赋予一个变量var jq = jQuery.noConflict(); 修改成为:<script type="text/javascript"& ...

随机推荐

  1. Python创建virtualenv(虚拟环境)方法

    本文目录 一 前言 二 通过virtualenv软件创建 三 在pycharm下创建 新建项目 四 已有项目使用和创建虚拟环境 五 参数说明 一 前言 需求:        --公司之有一台服务器   ...

  2. java实现计算器

    Main_business.java import java.util.Scanner; public class Main_business { public void getMyCalculate ...

  3. python设计模式第十七天【解释器模式】

    1.应用场景 (1)解释预先定义的文法 2.代码实现 #!/usr/bin/env python #!_*_ coding:UTF-8 _*_ from abc import ABCMeta, abs ...

  4. Servlet学习的一些笔记

    Servlet一点笔记 Servlet:Server Applet,全称Java Servlet,是运行在Web服务器或应用服务器上的程序,它是作为来自Web浏览器或其他HTTP客户端的请求和HTTP ...

  5. PDO访问Mysql数据库

    $dsn = 'mysql:host=127.0.0.1;dbname=myblog'; $username = 'root'; $pwd = '; $pdo = new PDO($dsn,$user ...

  6. thinkphp视图中插入php代码

    性别: <?php if($item['sex'] == 1):?> 男 <?php else:?> 女 <?php endif;?> 错误:<?php ec ...

  7. java 运行 .jar 文件乱码

    http://yang3wei.github.io/blog/2013/02/10/java-dfile-dot-encoding-equals-utf-8-gan-diao-luan-ma/ 启动时 ...

  8. windows下ping端口

    上图的操作完成以后  进入dos控制台 输入telnet  ip地址  端口号   回车 标识已ping通 ping不通是这种提示

  9. 前端nginx+Java后台ftp处理页面图片上传踩坑

    今天,将前端代码部署到服务器nginx上,在测试多图片上传时,报错413请求体空间太大,请求都没到后台,直接被nginx拦截,调整后又报错504. 整体而言,前端存在两处问题: 413 错误 :Req ...

  10. VM磁盘映射共享方法,要求文件系统必须一致

    如果主机是window系统,那么虚拟机也应该是Windows系统,不然不起作用