Added template which sends the accepted speakes a mail.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Thu, 03 Dec 2009 01:44:56 +0530
changeset 42 efacdf0cd268
parent 41 cf02d105aea2
child 43 cb1a447c48f4
Added template which sends the accepted speakes a mail.
project/templates/notifications/speaker_accepted_mail.html
scripts/mails.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project/templates/notifications/speaker_accepted_mail.html	Thu Dec 03 01:44:56 2009 +0530
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/mails.py	Thu Dec 03 01:44:56 2009 +0530
@@ -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')