diff options
author | Madhusudan.C.S | 2009-12-08 12:21:09 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2009-12-08 12:21:09 +0530 |
commit | cd5acba1376ed14bb7979c4c279c14ad743422ba (patch) | |
tree | fa39e2d7b017555cdf8d6b240f2b23654ee5207d /scripts | |
parent | ae0fac63b6f626dc69f5b1c7d0d8aa10025cc970 (diff) | |
download | scipycon-cd5acba1376ed14bb7979c4c279c14ad743422ba.tar.gz scipycon-cd5acba1376ed14bb7979c4c279c14ad743422ba.tar.bz2 scipycon-cd5acba1376ed14bb7979c4c279c14ad743422ba.zip |
Summary of individual events mail to all users.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mails.py | 41 |
1 files changed, 39 insertions, 2 deletions
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') |