diff options
author | Madhusudan.C.S | 2009-12-03 01:44:56 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2009-12-03 01:44:56 +0530 |
commit | 60e8b9b6c8a7f1907fb6cb928ff3b8366285d553 (patch) | |
tree | 30ecfc1209564fe1653b7bacb05eda63fba36e90 /scripts | |
parent | 7690e31656fece5cd80be894f7907f25551291be (diff) | |
download | scipycon-60e8b9b6c8a7f1907fb6cb928ff3b8366285d553.tar.gz scipycon-60e8b9b6c8a7f1907fb6cb928ff3b8366285d553.tar.bz2 scipycon-60e8b9b6c8a7f1907fb6cb928ff3b8366285d553.zip |
Added template which sends the accepted speakes a mail.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mails.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/mails.py b/scripts/mails.py new file mode 100644 index 0000000..460ee98 --- /dev/null +++ b/scripts/mails.py @@ -0,0 +1,32 @@ +"""Helper script to send emails to the users to remind of the +registration and inform them to complete their profiles and stuff. +""" + + +__authors__ = [ + '"Madhusudan.C.S" <madhusudancs@gmail.com>', + ] + + +from django.template import loader + +from project.kiwipycon.talk.models import Talk + + +def speaker_accepted(): + """Sends a mail to each speaker whose talk has been accepted + informing them about the same. + """ + + talks = Talk.objects.all() + + template = 'notifications/speaker_accepted_mail.html' + + for talk in talks: + subject = 'Your talk has been selected for SciPy.in 2009!' + 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') |