settings: Make EMAIL_BACKEND more flexible.
This commit is contained in:
parent
7a25022890
commit
1aa1daf3f6
1 changed files with 5 additions and 2 deletions
|
@ -286,8 +286,11 @@ FIXTURE_DIRS = [
|
|||
|
||||
# Heroku: Get email configuration from environment variables.
|
||||
|
||||
EMAIL_BACKEND = "email_log.backends.EmailBackend"
|
||||
EMAIL_LOG_BACKEND = os.environ.get("DJANGO_EMAIL_BACKEND", "django.core.mail.backends.console.EmailBackend") # noqa
|
||||
EMAIL_BACKEND = os.environ.get(
|
||||
"DJANGO_EMAIL_BACKEND",
|
||||
"django.core.mail.backends.{}.EmailBackend".format('console' if DEBUG else 'smtp'),
|
||||
)
|
||||
EMAIL_LOG_BACKEND = "email_log.backends.EmailBackend"
|
||||
EMAIL_HOST = os.environ.get("DJANGO_EMAIL_HOST", "")
|
||||
EMAIL_PORT = int(os.environ.get("DJANGO_EMAIL_PORT", 25))
|
||||
EMAIL_HOST_USER = os.environ.get("DJANGO_EMAIL_HOST_USER", "")
|
||||
|
|
Loading…
Reference in a new issue