X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=tools%2Fnotify.py;h=bc0b4d84336d95f835f31b6dc1a8a6cb34b22914;hb=dec395df81b874a8b88e34935712f9265d412eef;hp=08bc47761f82f8247a19896f07ea9573d753a14e;hpb=9babde1e22ffce2534f5c62b7e06afeb62261469;p=matthijs%2Fprojects%2Fxerxes.git diff --git a/tools/notify.py b/tools/notify.py index 08bc477..bc0b4d8 100644 --- a/tools/notify.py +++ b/tools/notify.py @@ -1,7 +1,7 @@ from django.contrib.auth.models import User,Group from django.core.mail import EmailMessage from django.template import loader -from ee.tools.misc import make_iter +from xerxes.tools.misc import make_iter """ Notify someone about something. @@ -23,7 +23,7 @@ def notify(recipients, template, context = {}): context['addresses'] = addresses rendered = loader.render_to_string(template, context) - (headers, body) = rendered.split('\n\n', 2) + (headers, body) = rendered.split('\n\n', 1) # Turn the headers into a dict so EmailMessage can turn them into a # string again. Bit pointless, but it works. @@ -55,3 +55,4 @@ def notify(recipients, template, context = {}): headers = headers_dict ) msg.send() +# vim: set sts=4 sw=4 expandtab: