简体   繁体   English

我应该如何设置 DJANGO_SETTINGS_MODULE,django.core.exceptions.ImproperlyConfigured:请求设置 EMAIL_BACKEND

[英]How should i set DJANGO_SETTINGS_MODULE, django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND

i'm just start to learn Django and during create a priject i get a problem: "django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND..."我刚刚开始学习 Django,在创建项目期间我遇到了一个问题:“django.core.exceptions.ImproperlyConfigured:请求设置 EMAIL_BACKEND ...”

I met description fo this problem on Staciverflow but i don't understand in which file i should set DJANGO_SETTINGS_MODULE???我在 Staciverflow 上遇到了这个问题的描述,但我不明白我应该在哪个文件中设置 DJANGO_SETTINGS_MODULE???

Please, give me detail description请给我详细的描述

I tried set this environment variable in my virtualenv which i use for my project in "activate" file, but it did'nt help me.我尝试在我的 virtualenv 中设置这个环境变量,我在“激活”文件中用于我的项目,但它没有帮助我。

Maybe my question is stupid but i really don't understand, sorry也许我的问题很愚蠢,但我真的不明白,抱歉

settings.py file is where you set your project configuration file. settings.py 文件是您设置项目配置文件的地方。 one of them is the email backend server.其中之一是 email 后端服务器。 i dont what you have in your project to raise this issue, but django has a built in server for testing perpose.我不知道你在项目中有什么可以提出这个问题,但 django 有一个内置服务器用于测试 perpose。 Include this line on your settings.py file将此行包含在您的 settings.py 文件中

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

This sends a message to console everytime u send an email from django app.每次您从 django 应用程序发送 email 时,这都会向控制台发送一条消息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 django.core.exceptions.ImproperlyConfigured:请求设置 USE_I18N,但未配置设置 - django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured raise ImproperlyConfigured(django.core.exceptions.ImproperlyConfigured:请求设置 INSTALLED_APPS,但未配置设置 - raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured django.core.exceptions.ImproperlyConfigured:请求设置 LOGGING_CONFIG - django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG django.core.exceptions.ImproperlyConfigured:请求的设置DEFAULT_INDEX_TAB LESPACE,但未配置设置 - django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TAB LESPACE, but settings are not configured django.core.exceptions.ImproperlyConfigured:请求设置 LOGGING_CONFIG,但未配置设置 - django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured django.core.exceptions.ImproperlyConfigured 错误:请求设置 INSTALLED_APPS,但未配置设置 - django.core.exceptions.ImproperlyConfigured error: Requested setting INSTALLED_APPS, but settings are not configured django.core.exceptions.ImproperlyConfigured:请求设置INSTALLED_APPS,但未配置设置 - django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured django.core.exceptions.ImproperlyConfigured:请求的设置DEFAULT_INDEX_TABLESPACE,但未配置设置 - django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured django.core.exceptions.ImproperlyConfigured:请求设置 AUTH_USER_MODEL,但未配置设置 - django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured 如何解决 django.core.exceptions.ImproperlyConfigured:请求设置 INSTALLED_APPS 错误? - How to resolve django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM