Author: [EMAIL PROTECTED]
Date: Wed Sep 24 02:11:50 2008
New Revision: 76

Modified:
    trunk/messages/utils.py

Log:
use django-mailer only if it's in installed-apps. fixes #16

Modified: trunk/messages/utils.py
==============================================================================
--- trunk/messages/utils.py     (original)
+++ trunk/messages/utils.py     Wed Sep 24 02:11:50 2008
@@ -4,11 +4,14 @@
  from django.template import Context, loader
  from django.template.loader import render_to_string
  from django.conf import settings
+from django.db.models import get_app
+from django.core.exceptions import ImproperlyConfigured

  # favour django-mailer but fall back to django.core.mail
  try:
+    mailer = get_app("mailer")
      from mailer import send_mail
-except ImportError:
+except ImproperlyConfigured:
      from django.core.mail import send_mail

  def format_quote(text):

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to