Skip to content

Commit

Permalink
Add admin email handler
Browse files Browse the repository at this point in the history
  • Loading branch information
geekygirlsarah committed Oct 9, 2023
1 parent f3844cc commit 3628bc3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions codethesaurus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,17 @@
EMAIL_PORT = os.getenv('EMAIL_PORT', '')
EMAIL_USE_TLS = os.getenv('EMAIL_USE_TLS', '')

LOGGING = {
"version": 1, # the dictConfig format version
"disable_existing_loggers": False, # retain the default loggers
"handlers": {
"mail_admins": {
"level": "ERROR",
"class": "django.utils.log.AdminEmailHandler",
"include_html": True,
},
}
}

# Configure Django App for Heroku.
django_on_heroku.settings(locals(), test_runner=False, databases=False, staticfiles=True, logging=True)

0 comments on commit 3628bc3

Please sign in to comment.