django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

解决方案:
开发Django项目时使用PyCharm运行项目时总是报错,找了好久,猛然发现:
启动有误啊!!
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not
应该是这样:
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not
然后启动、哈哈哈、一切正常
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not

大意惹的祸啊!!!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-11-03
  • 2022-12-23
  • 2021-12-09
  • 2021-08-19
  • 2022-02-15
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2021-10-13
  • 2021-05-25
相关资源
相似解决方案