运行Django的时候报错为:
django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
导致原因是因为在Django配置中并未指定settings文件,导致settings无法加载,
解决方案:
PYTHONUNBUFFERED=1;DJANGO_SETTINGS_MODULE=项目名.settings
我这边项目名为untitled所以写为如下: