Author: brosner
Date: Sun Sep 28 22:02:37 2008
New Revision: 40
Modified:
trunk/devproject/emailconfirmation/utils.py
Log:
Adjusted the conditional to check for mailer in INSTALLED_APPS explicitly
instead of through get_app which isn't safe from a models.py.
Modified: trunk/devproject/emailconfirmation/utils.py
==============================================================================
--- trunk/devproject/emailconfirmation/utils.py (original)
+++ trunk/devproject/emailconfirmation/utils.py Sun Sep 28 22:02:37 2008
@@ -1,12 +1,13 @@
+from django.conf import settings
+
def get_send_mail():
"""
A function to return a send_mail function suitable for use in the app.
It
deals with incompatibilities between signatures.
"""
- from django.db.models.loading import get_app
# favour django-mailer but fall back to django.core.mail
- if get_app("mailer", emptyOK=True):
+ if "mailer" in settings.INSTALLED_APPS:
from mailer import send_mail
else:
from django.core.mail import send_mail as _send_mail
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---