Search code examples
pythondjangodjango-rest-frameworkdjango-settings

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..."

I met description fo this problem on Staciverflow but i don't understand in which file i should set 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.

Maybe my question is stupid but i really don't understand, sorry


Solution

  • settings.py file is where you set your project configuration file. one of them is the email backend server. i dont what you have in your project to raise this issue, but django has a built in server for testing perpose. Include this line on your settings.py file

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

    This sends a message to console everytime u send an email from django app.