Skip to content
Browse files

Do not use get_app for getting mailer. It was causing a circular import.

  • Loading branch information...
1 parent f7d0e17 commit ba8de99cf00eb3bb4a702f4d0026a5d7e118da75 @brosner brosner committed
Showing with 2 additions and 4 deletions.
  1. +2 −4 notification/backends/email.py
View
6 notification/backends/email.py
@@ -11,13 +11,11 @@
from notification.message import message_to_text
# favour django-mailer but fall back to django.core.mail
-try:
- mailer = get_app("mailer")
+if "mailer" in settings.INSTALLED_APPS:
from mailer import send_mail
-except ImproperlyConfigured:
+else:
from django.core.mail import send_mail
-
class EmailBackend(backends.BaseBackend):
spam_sensitivity = 2

0 comments on commit ba8de99

Please sign in to comment.
Something went wrong with that request. Please try again.