From cd5acba1376ed14bb7979c4c279c14ad743422ba Mon Sep 17 00:00:00 2001 From: Madhusudan.C.S Date: Tue, 8 Dec 2009 12:21:09 +0530 Subject: Summary of individual events mail to all users. --- scripts/mails.py | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/mails.py b/scripts/mails.py index 95ad5fc..bbb85e9 100644 --- a/scripts/mails.py +++ b/scripts/mails.py @@ -9,9 +9,10 @@ __authors__ = [ from django.template import loader +from django.contrib.auth.models import User +from project.kiwipycon.registration.models import Registration from project.kiwipycon.talk.models import Talk -from django.contrib.auth.models import User def speaker_accepted(): @@ -67,4 +68,40 @@ def delegate_remainder(): template, dictionary={'name': reg.username}) reg.email_user(subject=subject, message=message, - from_email='madhusudancs@gmail.com') \ No newline at end of file + from_email='madhusudancs@gmail.com') + + +def delegate_about_event(): + """Sends a mail to each confirmed delegate informing + them about the the individual events. + """ + + regs = Registration.objects.all() + + template = 'notifications/sprints_about_mail.html' + + for reg in regs: + subject = 'SciPy.in 2009: Details of the individual events' + message = loader.render_to_string( + template, dictionary={'name': reg.registrant.username}) + + reg.registrant.email_user(subject=subject, message=message, + from_email='madhusudancs@gmail.com') + + +def speaker_confirmation(): + """Sends a mail to each speaker asking for confirmation. + """ + + talks = Talk.objects.all() + + template = 'notifications/speaker_confirmation_mail.html' + + for talk in talks: + subject = 'SciPy.in 2009: Requesting for confirmation of your talk' + message = loader.render_to_string( + template, dictionary={'name': talk.speaker.username, + 'title': talk.title}) + + talk.speaker.email_user(subject=subject, message=message, + from_email='admin@scipy.in') -- cgit