[英]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.