Author: leidel
Date: Sun Jan 11 17:38:14 2009
New Revision: 54

Modified:
    trunk/mailer/__init__.py
    trunk/mailer/management/__init__.py
    trunk/setup.py

Log:
Fixed setup.py and moved conditional monkey patch for the mail_admins  
replacement out of the way of mailer/__init__.py

Modified: trunk/mailer/__init__.py
==============================================================================
--- trunk/mailer/__init__.py    (original)
+++ trunk/mailer/__init__.py    Sun Jan 11 17:38:14 2009
@@ -1,5 +1,4 @@
  from django.utils.encoding import force_unicode
-from django.conf import settings

  VERSION = (0, 1, 0, "pre")

@@ -34,6 +33,7 @@
                  priority=priority).save()

  def mail_admins(subject, message, fail_silently=False, priority="medium"):
+    from django.conf import settings
      from mailer.models import Message
      priority = PRIORITY_MAPPING[priority]
      for name, to_address in settings.ADMINS:
@@ -42,7 +42,3 @@
                  subject=settings.EMAIL_SUBJECT_PREFIX +  
force_unicode(subject),
                  message_body=message,
                  priority=priority).save()
-
-if getattr(settings, 'MAILER_FOR_CRASH_EMAILS', False):
-    from django.core.handlers import base
-    base.mail_admins = mail_admins

Modified: trunk/mailer/management/__init__.py
==============================================================================
--- trunk/mailer/management/__init__.py (original)
+++ trunk/mailer/management/__init__.py Sun Jan 11 17:38:14 2009
@@ -0,0 +1,5 @@
+from django.conf import settings
+
+if getattr(settings, 'MAILER_FOR_CRASH_EMAILS', False):
+    from django.core.handlers import base
+    base.mail_admins = mail_admins

Modified: trunk/setup.py
==============================================================================
--- trunk/setup.py      (original)
+++ trunk/setup.py      Sun Jan 11 17:38:14 2009
@@ -9,9 +9,9 @@
      author_email='[email protected]',
      url='http://code.google.com/p/django-mailer/',
      packages=[
-        'notification',
-        'notification.management',
-        'notification.management.commands',
+        'mailer',
+        'mailer.management',
+        'mailer.management.commands',
      ],
      package_dir={'mailer': 'mailer'},
      classifiers=[

--~--~---------~--~----~------------~-------~--~----~
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