From 6363b4a422dc45e707b03cedf7ee71b94d283d96 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Thu, 17 Aug 2017 08:16:09 -0700 Subject: [PATCH] Sets the admin e-mail address --- pinaxcon/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index d568f71..6eaf3a2 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -34,6 +34,12 @@ ALLOWED_HOSTS = [".localhost", ".herokuapp.com", ".northbaypython.org"] TIME_ZONE = os.environ.get("TZ", "America/Los_Angeles") +# 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) SSL_ALWAYS = os.environ.get("DJANGO_SSL_ALWAYS", False)