diff options
-rw-r--r-- | project/templates/notifications/speaker_accepted_mail.html | 22 | ||||
-rw-r--r-- | scripts/mails.py | 32 |
2 files changed, 54 insertions, 0 deletions
diff --git a/project/templates/notifications/speaker_accepted_mail.html b/project/templates/notifications/speaker_accepted_mail.html new file mode 100644 index 0000000..c9f0269 --- /dev/null +++ b/project/templates/notifications/speaker_accepted_mail.html @@ -0,0 +1,22 @@ +Hello {{ name }}, + The first edition of the SciPy India conference, SciPy.in 2009 +is fast approaching. We have some exciting news for you. We have +reviewed your submission titled: +"{{ title }}" + + Your talk has been accepted. Thank you for submitting the paper. +Please go ahead and start preparing for the talk right away. We will +put up the detailed schedule of the talks very soon. + + Also, more updates on the conference itself and other details will +be posted on the Update section of our website which will be available +through the left panel of the site soon. You can also follow us on +twitter. Our twitter id is "fossee". + + Last but not the least, really sorry for this delay in announcing +the accepted talks. For any queries, please send a mail to +admin@scipy.in + +-- + Thanks, + SciPy Team 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') |