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

解决方法:

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

添加环境变量:

关于Django报错django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configure 随笔 第1张

关于Django报错django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configure 随笔 第2张

 

 DJANGO_SETTINGS_MODULE=projecname.settings #projectname是你的项目名字

其他的自己百度,还有许多其他方法。

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄