Mercurial > public > sg101
comparison gpp/core/functions.py @ 38:c14cfd6be87a
Added basic logging to settings.py. The send_email function is now logging. Removed remnants of the DebugLog model.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 11 Jun 2009 01:33:38 +0000 |
parents | 91fd31dc78fb |
children | b7ac381996e8 |
comparison
equal
deleted
inserted
replaced
37:91fd31dc78fb | 38:c14cfd6be87a |
---|---|
14 | 14 |
15 if settings.GPP_SEND_EMAIL: | 15 if settings.GPP_SEND_EMAIL: |
16 django.core.mail.send_mail(subject, message, from_email, recipient_list, | 16 django.core.mail.send_mail(subject, message, from_email, recipient_list, |
17 fail_silently, auth_user, auth_password) | 17 fail_silently, auth_user, auth_password) |
18 | 18 |
19 #logging.info('EMAIL:\nFrom: %s\nTo: %s\nSubject: %s\nMessage:\n%s' % | 19 import logging |
20 # (from_email, str(recipient_list), subject, message)) | 20 logging.debug('EMAIL:\nFrom: %s\nTo: %s\nSubject: %s\nMessage:\n%s' % |
21 (from_email, str(recipient_list), subject, message)) | |
21 | 22 |
22 | 23 |
23 def email_admins(subject, message): | 24 def email_admins(subject, message): |
24 """Emails the site admins. Goes through the site send_mail function.""" | 25 """Emails the site admins. Goes through the site send_mail function.""" |
25 site = Site.objects.get_current() | 26 site = Site.objects.get_current() |