Browse files

pluggable-backends: Use get_app over to include django-mailer support…

… over a standard import and ImportError exception handling.

git-svn-id: 590c3fc9-4838-0410-bb95-17a0c9b37ca9
  • Loading branch information...
1 parent f4d526c commit ede4689ce3f9e03db5f250617e793083333af3a5 @brosner brosner committed Jan 4, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 notification/backends/
5 notification/backends/
@@ -1,17 +1,20 @@
from django.conf import settings
+from django.db.models.loading import get_app
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.utils.translation import ugettext
from django.contrib.sites.models import Site
+from django.core.exceptions import ImproperlyConfigured
from notification import backends
from notification.message import message_to_text
# favour django-mailer but fall back to django.core.mail
+ mailer = get_app("mailer")
from mailer import send_mail
-except ImportError:
+except ImproperlyConfigured:
from django.core.mail import send_mail

0 comments on commit ede4689

Please sign in to comment.