django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND, but settings are not

在pycharm下想运行django单个模块并且这个模块中导入了settings时,就要去指定你的settings。
django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND, but settings are not_第1张图片
django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND, but settings are not_第2张图片

django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND, but settings are not_第3张图片

django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND, but settings are not_第4张图片
不然会报 :django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

你可能感兴趣的:(Django)