Obtain email host, port and tls settings from env

This commit is contained in:
PCoder 2017-12-31 00:58:37 +01:00
parent a4ff33f0fd
commit ace2abc47e
1 changed files with 6 additions and 2 deletions

View File

@ -63,8 +63,12 @@ LOGIN_URL = None
LOGOUT_URL = None
LOGIN_REDIRECT_URL = None
EMAIL_HOST = "localhost"
EMAIL_PORT = 25
EMAIL_HOST = env("EMAIL_HOST")
if not EMAIL_HOST:
EMAIL_HOST = "localhost"
EMAIL_PORT = int_env("EMAIL_PORT", 25)
EMAIL_USE_TLS = bool_env("EMAIL_USE_TLS")
SECRET_KEY = env('DJANGO_SECRET_KEY')
# Application definition