From a7c3259216332428815a99010d311b8fe008385d 2017-08-17 15:16:09 From: Christopher Neugebauer Date: 2017-08-17 15:16:09 Subject: [PATCH] Sets the admin e-mail address --- diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index d4a2e03bab4bc6a0d40821fe2a73846e4b09c459..9bde5811105a13afc7a6acf82321f03224e294b4 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -34,7 +34,12 @@ CANONICAL_HOST = os.environ.get("DJANGO_CANONICAL_HOST", None) # system time zone. TIME_ZONE = os.environ.get("TZ", "America/Los_Angeles") -ADMINS = ("Webmaster", os.environ.get("DJANGO_ADMIN_EMAIL", "webmaster@localhost")) + +# Set the email address that will receive errors. +admin_email = os.environ.get("DJANGO_ADMIN_EMAIL", None) +if admin_email is not None: + ADMINS = ("Webmaster", admin_email) + # Use SSLRedirectMiddleware SSL_ON = os.environ.get("DJANGO_SSL_ON", True)