如图报错,在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. CART算法与剪枝原理

    参考:https://blog.csdn.net/u014688145/article/details/53326910 知乎:https://www.zhihu.com/question/22697 ...

  2. C#中as运算符

    as运算符用于执行引用类型的显式类型转换.如果要转换的类型与指定的类型兼容,转换就会成功进行:如果类型不兼容,as运算符就会返回null值.如下面的代码所示,如果object引用实际上不引用strin ...

  3. ORACLE 增加两列字段

    declare v_cnt number; V_SQL VARCHAR2 (500) := '';begin select count(*) into v_cnt from dual where ex ...

  4. Vue-router的API详解

    前面的话 本文将详细介绍Vue-router的API router-link <router-link> 组件支持用户在具有路由功能的应用中点击导航. 通过 to 属性指定目标地址,默认渲 ...

  5. linux环境 :LIBRARY_PATH, LD_LIBRARY_PATH区别

    参考: https://www.cnblogs.com/mylinux/p/4955448.html LIBRARY_PATH和LD_LIBRARY_PATH是Linux下的两个环境变量,二者的含义和 ...

  6. Introduction to Dynamic SQL

    The idea of using dynamic SQL is to execute SQL that will potentially generate and execute another S ...

  7. Nginx split_client模块

    一般用户AB测试根据比例调用指定的接口  默认编译进nginx Syntax: split_clients string $variable { ... } Default: — Context: h ...

  8. 【NLP】How to Generate Embeddings?

    How to represent words. 0 . Native represtation: one-hot vectors Demision: |all words| (too large an ...

  9. Civil 3D 二次开发 创建AutoCAD对象—— 01 —— 创建直线

    在方法CreateLine内完成以下代码: 01 public void CreateLine() 02 { 03 PromptPointOptions ppo = new PromptPointOp ...

  10. thymeleaf手动映射根路径映射

    到/src/java/resources/templates/index.html下 @RequestMapping("/") public String index(){ ret ...