Skip to content

Commit

Permalink
Format ADMINS setting as Django expects
Browse files Browse the repository at this point in the history
  • Loading branch information
friedelwolff committed Aug 21, 2024
1 parent a74a486 commit dc5231f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ def __contains__(self, address):
DEFAULT_FROM_EMAIL = os.environ.get("DEFAULT_FROM_EMAIL", "webmaster@localhost")
SERVER_EMAIL = os.environ.get("SERVER_EMAIL", "root@localhost")
EMAIL_SUBJECT_PREFIX = os.environ.get("EMAIL_SUBJECT_PREFIX", "[Django] ")
ADMINS = os.environ.get("ADMINS", "").split()
# Format as: Name Surname [email protected], Name Surname [email protected]
if _admins := os.environ.get("ADMINS", ""):
ADMINS = [a.strip().rsplit(maxsplit=1) for a in _admins.split(",")]

email_backend_env = os.environ.get("EMAIL_BACKEND_CONSOLE", "False").lower() in ["true", "1", "yes"]

Expand Down

0 comments on commit dc5231f

Please sign in to comment.