找了网上好多的答案,都是重配置环境变量,但是没什么用…

我的环境变量配置:

后来发现是因为你的django项目中的manage.py里面import了一些没用的东西,把那些没有用到的import删掉或者注释掉就行了。

我的django目录如下:

从models里面import  UserMessage时,还是出现了apps aren't loaded的问题。

我的import格式为:

解决:1.先在cmd中进入django的文件路径,运行  python  manage.py  shell  这行代码;2.返回pycharm中的django项目,运行发现新的报错:RuntimeError: Model class message.models.UserMessage doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.这是因为apps.py下面的name不对,应该改为:

然后我的就可以运行通了。

django报错Apps aren‘t loaded相关推荐

  1. Django报错 ValueError: The view didn‘t return an HttpResponse object. It returned None instead.

    Django报错 ValueError: The view *** didn't return an HttpResponse object. It returned None instead. __ ...

  2. django报错: Specifying a namespace in include() without providing an app_name

    django报错: 'Specifying a namespace in include() without providing an app_name ' django.core.exception ...

  3. Django报错:“Key ‘id‘ not found in ‘xxx‘

    Django报错:"Key 'id' not found in 'xxx' 在写django的时候发现了这个错误,id一开始一脸懵逼,id字段不可能不存在啊... 查了一下发现问题在admi ...

  4. django报错TypeError: __init__() missing 1 required positional argument: 'on_delete'

    个人博客页面链接:http://www.shihao.online (django搭建的个人博客,还在完善中) django报错 TypeError: __init__() missing 1 req ...

  5. [iOS Xcode8报错]dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserN

    升级了Xcode8,但是我的真机是iOS7系统,在我解决了Xcode8不支持iOS7系统以后(http://blog.csdn.net/iOSTianNan/article/details/52619 ...

  6. django报错:ImproperlyConfigured和AppRegistryNotReady

    1.报错信息: django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG,but settings a ...

  7. 启动django报错:TypeError: __init__() got an unexpected keyword argument ‘providing_args‘

    问题一:django跨域 现象: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present ...

  8. Django报错SocialApp matching query does not exist以及Django的SITE_ID = 1的含义

    搞第三方授权登录的时候 完整报错如下: DoesNotExist at /accounts/github/login/ SocialApp matching query does not exist. ...

  9. python+pycharm+Django报错

    报错: Unhandled exception in thread started by <function wrapper at 0x2d7e410> Traceback (most r ...

最新文章

  1. Flutter控件--Switch 和 SwitchListTile
  2. python中list作为全局变量无需global声明的原因
  3. PyTorch Upsample() 函数实现上采样
  4. python爬虫:做一个界面爬虫小软件
  5. 【Python入门】一个有意思还有用的Python包-汉字转换拼音
  6. spring mvc工作原理及组件说明
  7. Dima and a Bad XOR
  8. 将旧项目从Ant迁移到Maven的4个简单步骤
  9. html flash层级,解决FLASH遮住其他层元素问题
  10. 使用named_mutex实现读写锁,实现进程之间读共享写独占
  11. 美国在理论计算机科学的研究重视,清华麻省理工香港中文联建理论计算机科学研究中心...
  12. 机器学习入门学习视频和书籍(笔记保存)
  13. C#设计模式之9-装饰者模式
  14. 微课|Python程序设计开发宝典(5.1.2节):嵌套函数定义2
  15. RLException: XXX is neither a launch file in package XXX nor is XXX a launch file name问题解决
  16. Vue cli 入门补充
  17. Android 接口测方法
  18. python云计算1_python云计算1
  19. 软件配置管理岗位职责说明
  20. Linux的企鹅图标

热门文章

  1. 用python画雪花-python画图——雪花(科赫曲线)
  2. Arduino测试PAJ7620U2手势传感器
  3. 基于c语言实现TCP连网斗地主(三)
  4. android录像摄像头卡死,Android用摄像头的那点破事
  5. JAR包混淆与加密处理
  6. QEMU安装Ubuntu 20.04的完整过程
  7. FPGA操作WM8731音频编解码器从机模式,little white的自我进阶
  8. 使用freemarker模板导出word文档
  9. nginx转发导致400错误
  10. CUDA:实现mergeSort合并排序的实例