django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS,
时间: 2023-10-19 21:01:43 浏览: 164
django.db.utils.ProgrammingError: (1146, u“Table‘’ doesn’t exist”)问题的解决
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured是一个常见的错误。这个错误提示表明在访问设置之前,需要配置Django的设置。
解决这个问题的方法有两种:
1. 定义环境变量DJANGO_SETTINGS_MODULE:
在项目的根目录中,可以通过在终端中使用export命令来定义环境变量DJANGO_SETTINGS_MODULE,例如:
export DJANGO_SETTINGS_MODULE=<项目名称>.settings
然后再次运行项目,应该就不会再报错了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [django调试问题django.core.exceptions.ImproperlyConfigured](https://blog.csdn.net/weixin_44602651/article/details/120456631)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Django报错:django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS解决办法](https://blog.csdn.net/jyr2014/article/details/126753776)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文