django报错Apps aren‘t loaded
找了网上好多的答案,都是重配置环境变量,但是没什么用…
我的环境变量配置:
后来发现是因为你的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相关推荐
- 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. __ ...
- 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 ...
- Django报错:“Key ‘id‘ not found in ‘xxx‘
Django报错:"Key 'id' not found in 'xxx' 在写django的时候发现了这个错误,id一开始一脸懵逼,id字段不可能不存在啊... 查了一下发现问题在admi ...
- django报错TypeError: __init__() missing 1 required positional argument: 'on_delete'
个人博客页面链接:http://www.shihao.online (django搭建的个人博客,还在完善中) django报错 TypeError: __init__() missing 1 req ...
- [iOS Xcode8报错]dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserN
升级了Xcode8,但是我的真机是iOS7系统,在我解决了Xcode8不支持iOS7系统以后(http://blog.csdn.net/iOSTianNan/article/details/52619 ...
- django报错:ImproperlyConfigured和AppRegistryNotReady
1.报错信息: django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG,but settings a ...
- 启动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 ...
- Django报错SocialApp matching query does not exist以及Django的SITE_ID = 1的含义
搞第三方授权登录的时候 完整报错如下: DoesNotExist at /accounts/github/login/ SocialApp matching query does not exist. ...
- python+pycharm+Django报错
报错: Unhandled exception in thread started by <function wrapper at 0x2d7e410> Traceback (most r ...
最新文章
- Flutter控件--Switch 和 SwitchListTile
- python中list作为全局变量无需global声明的原因
- PyTorch Upsample() 函数实现上采样
- python爬虫:做一个界面爬虫小软件
- 【Python入门】一个有意思还有用的Python包-汉字转换拼音
- spring mvc工作原理及组件说明
- Dima and a Bad XOR
- 将旧项目从Ant迁移到Maven的4个简单步骤
- html flash层级,解决FLASH遮住其他层元素问题
- 使用named_mutex实现读写锁,实现进程之间读共享写独占
- 美国在理论计算机科学的研究重视,清华麻省理工香港中文联建理论计算机科学研究中心...
- 机器学习入门学习视频和书籍(笔记保存)
- C#设计模式之9-装饰者模式
- 微课|Python程序设计开发宝典(5.1.2节):嵌套函数定义2
- RLException: XXX is neither a launch file in package XXX nor is XXX a launch file name问题解决
- Vue cli 入门补充
- Android 接口测方法
- python云计算1_python云计算1
- 软件配置管理岗位职责说明
- Linux的企鹅图标