From: Guillaume Pellerin Date: Thu, 3 Oct 2013 10:36:43 +0000 (+0200) Subject: Merge remote-tracking branch 'hg/master' X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=0c135b94b98768ca23c6c7484bd1eecbf99d1244;p=django-postman.git Merge remote-tracking branch 'hg/master' Conflicts: postman/models.py postman/query.py postman/utils.py --- 0c135b94b98768ca23c6c7484bd1eecbf99d1244 diff --cc postman/utils.py index bcc67ba,64dbacf..c23647f --- a/postman/utils.py +++ b/postman/utils.py @@@ -78,15 -73,14 +76,15 @@@ def email(subject_template, message_tem message = render_to_string(message_template, ctx_dict) # during the development phase, consider using the setting: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, recipient_list, fail_silently=True) + mail_admins(subject, message) - def email_visitor(object, action): + def email_visitor(object, action, site): """Email a visitor.""" - email('postman/email_visitor_subject.txt', 'postman/email_visitor.txt', [object.email], object, action) + email('postman/email_visitor_subject.txt', 'postman/email_visitor.txt', [object.email], object, action, site) - def notify_user(object, action): + def notify_user(object, action, site): """Notify a user.""" if action == 'rejection': user = object.sender