Skip to content

Commit

Permalink
Merge pull request #117 from SADiLaR/more-mail-settings
Browse files Browse the repository at this point in the history
Format ADMINS setting as Django expects
  • Loading branch information
friedelwolff authored Aug 21, 2024
2 parents e36730e + dc5231f commit 524701e
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 524701e

Please sign in to comment.