From 57e9073f6b79905c10d72eb2e5d310dbeacc195c Mon Sep 17 00:00:00 2001 From: Sonny Date: Sun, 26 Apr 2020 21:17:55 +0200 Subject: [PATCH] Allow admins to be specified through env variables --- src/newsreader/conf/production.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/newsreader/conf/production.py b/src/newsreader/conf/production.py index 3e3369d..b5c766a 100644 --- a/src/newsreader/conf/production.py +++ b/src/newsreader/conf/production.py @@ -9,7 +9,13 @@ from .base import * # isort:skip load_dotenv() DEBUG = False + ALLOWED_HOSTS = ["rss.fudiggity.nl"] +ADMINS = [ + ("", email) + for email in os.getenv("ADMINS", "").split(",") + if os.environ.get("ADMINS") +] SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]