Skip to content

Commit

Permalink
Support logging emails to console in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pmakholm committed Jul 30, 2024
1 parent 14f04ea commit a3b2e46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boofilsic/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@
EMAIL_BACKEND = _parsed_email_url.hostname
ANYMAIL = dict(parse.parse_qsl(_parsed_email_url.query))
ENABLE_LOGIN_EMAIL = True
elif DEBUG and _parsed_email_url.scheme == "console":
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
ENABLE_LOGIN_EMAIL = True
elif _parsed_email_url.scheme:
_parsed_email_config = env.email("NEODB_EMAIL_URL")
EMAIL_TIMEOUT = 5
Expand Down

0 comments on commit a3b2e46

Please sign in to comment.