在settings.py中增加

INSTALLED_APPS = [
...
'django.contrib.sites',
]

问题就解决了。什么原因。——不知道。。

具体请看:

https://stackoverflow.com/questions/35388637/runtimeerror-model-class-django-contrib-sites-models-site-doesnt-declare-an-ex

doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.的更多相关文章

  1. 关于Django 错误 doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS

    记录一下 报错 doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS\ 这个问题出现没 ...

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

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

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

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

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

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

  9. 在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 ...

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

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

随机推荐

  1. css调用字体 没装微软雅黑,用css写@font-face让其能显示微软雅黑字体

    在设计布局网页时 经常想要用一些比较好看的字体,比如微软雅黑,这个字体在近年来在网页设计中运用越来越平常, 然而所使用的字体也只有自己能看到 到别的机子上 又恢复了原来的宋体神马的. 经过一位高手的提 ...

  2. Python3之实现字符反转

    参考:https://www.cnblogs.com/jasmine0627/p/9510296.html 将字符串s="helloworld"反转为‘dlrowolleh’ fa ...

  3. Tesnsorflow命名空间与变量管理参数reuse

    一.TensorFlow中变量管理reuse参数的使用 1.TensorFlow用于变量管理的函数主要有两个:  (1)tf.get_variable:用于创建或获取变量的值  (2)tf.varia ...

  4. 《CNCF × Alibaba云原生技术公开课》知识点自测(二):容器基本概念

    (单选)1.已运行 docker run -d -t —name demo ubuntu top 和 docker run --name demo-x --pid container:demo ubu ...

  5. Springboot 参数中传List

    使用REST API时,经常会有get/delete方法需要传一个list的情况,如果使用post难免有点破坏规则,实际上参数传list是可以做到的 方法一: 后端代码如下: @DeleteMappi ...

  6. Windows 10系统快捷键

    虚拟桌面 创建新的虚拟桌面:Win + Ctrl + D 关闭当前虚拟桌面:Win + Ctrl + F4 切换虚拟桌面:Win + Ctrl +左/右 任务视图:Win + Tab Win10常用W ...

  7. mysql 数据库批量刷新表字段数据

    UPDATE a,bSET b.studentno = a.studentnumber WHERE b.studentno IS NULL AND a.p_id = b.p_id

  8. Python异常 --Python

    一.常见的异常类型 FileNotFoundError:找不到指定文件的异常 NameError:未声明或者未初始化对象 BaseException:所有异常的基类 二.异常处理语句 1.try... ...

  9. 封装Json+日志

    /** * 输出json * @param $msg * @param int $errno */ public function printOutError($msg = '操作失败', $errn ...

  10. Spring 设计模式之责任链模式

    [应用] 以下是一段代码,Spring MVC 的 diapatcherServlet 的 doDispatch 方法中,获取与请求匹配的处理器(HandlerExecutionChain) getH ...