Skip to content
Snippets Groups Projects

Resolve "Provide base templates for e-mails generated by apps"

All threads resolved!
1 file
+ 5
4
Compare changes
  • Side-by-side
  • Inline
+ 5
4
import os
from traceback import format_exception
from django.conf import settings
@@ -17,7 +18,7 @@ app.autodiscover_tasks()
@task_failure.connect
def task_failure_notifier(
sender=None, task_id=None, exception=None, args=None, traceback=None, **kwargs
sender=None, task_id=None, exception=None, args=None, kwargs=None, traceback=None, **__
):
recipient_list = [e[1] for e in settings.ADMINS]
send_email(
@@ -29,8 +30,8 @@ def task_failure_notifier(
"task": str(sender),
"task_id": str(task_id),
"exception": str(exception),
"args": str(args),
"kwargs": str(kwargs),
"traceback": str(traceback),
"args": args,
"kwargs": kwargs,
"traceback": "".join(format_exception(type(exception), exception, traceback)),
},
)
Loading