diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-07-06 22:52:19 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-07-06 22:55:55 +0100 |
commit | 9dd3570a52027ecb8e84dacb87d66fc511812c3c (patch) | |
tree | 592de230866ec516d44de1131f3b64b4a549bfb2 /app/__init__.py | |
parent | a6c8b12cdd55906e03d79c4c776914cd43567055 (diff) | |
download | cheatdb-9dd3570a52027ecb8e84dacb87d66fc511812c3c.tar.xz |
Add email on Flask error
Diffstat (limited to 'app/__init__.py')
-rw-r--r-- | app/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/__init__.py b/app/__init__.py index 8b7dd6a..37c6cc8 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -37,5 +37,9 @@ csrf = CsrfProtect(app) mail = Mail(app) pages = FlatPages(app) +if not app.debug: + from .maillogger import register_mail_error_handler + register_mail_error_handler(app, mail) + from . import models, tasks from .views import * |