在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. iOS-NSString值为Unicode格式(字符串编码转换成中文编码)

    + (NSString *)replaceUnicode:(NSString *)unicodeStr  {             NSString *tempStr1 = [unicodeStrs ...

  2. SmartCode

    SmartCode(https://github.com/Ahoo-Wang/SmartCode) SmartCode = IDataSource -> IBuildTask -> IOu ...

  3. Docker 镜像小结---操作指令介绍(七)

    目录 一.搜索镜像 二.下载镜像 三.查看本地镜像 四.显示镜像构建历史 五.删除镜像 六.镜像创建 七.上传镜像 八.给镜像打 tag 九.存出和载入镜像 一.搜索镜像 很多情况下我们可能需要下载某 ...

  4. RabbitMQ的安装(Windows环境下)

    在使用RabbitMQ之前,先知道什么是AMQP,AMQP 即 Advanced Message Queuing Protocol ,又叫高级消息队列协议,是应用层协议的一个开放标准,其主要特征是面向 ...

  5. JVM —— 类文件结构(下)

    简介 Java虚拟机的指令由一个字节长度的.代表着某种特定操作含义的操作码(opcode)以及跟随其后的零至多个代表此操作所需参数的操作数(operand)所构成 虚拟机中许多指令并不包含操作数.只有 ...

  6. AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks 笔记

    AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks 笔记 这 ...

  7. 编码方式之ASCII、ANSI、Unicode概述

    1.ASCII ASCII全称(American Standard Code for Information Interchange)美国信息交换标准代码,在计算机内部中8位二进制位组成1个字节(8( ...

  8. vue-cookies的使用

    安装vue-cookies npm install vue-cookies --save 使用vue-cookies // 在main.js中 // require var Vue = require ...

  9. 使用Duilib开发Windows软件(2)——控件的基本介绍

    XML 先学习xml https://www.w3cschool.cn/xml/xml-xml-tutorialhc4o1t5m.html 控件 上图是我们下载的NIM_Duilib_Framewor ...

  10. Sparse PCA 稀疏主成分分析

    Sparse PCA 稀疏主成分分析 2016-12-06 16:58:38 qilin2016 阅读数 15677 文章标签: 统计学习算法 更多 分类专栏: Machine Learning   ...