Sponsorship for speakers mail.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Sat, 05 Dec 2009 09:39:02 +0530
changeset 44 c390adb66ba6
parent 43 cb1a447c48f4
child 45 a7cb2566be42
Sponsorship for speakers mail.
project/templates/notifications/speaker_sponsorship_mail.html
scripts/mails.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project/templates/notifications/speaker_sponsorship_mail.html	Sat Dec 05 09:39:02 2009 +0530
@@ -0,0 +1,22 @@
+Hello {{ name }},
+  We have already informed you that your talk titled
+"{{ title }}"
+for SciPy.in 2009 has been accepted. Hopefully, you have received
+that mail. Congratulations!
+
+  We have already arranged accommodation for you on a shared room
+basis i.e you will be given a room in a good hotel which you will
+be sharing with another speaker. So you need not worry about your
+accommodation.
+
+  Also, we will be sponsoring your train fare, upto 3-tier AC.
+Suppose if you travel by any other means of transport, because of
+your own reasons, you can still get the reimbursement of the
+equivalent 3-tier AC ticket fare from your place of travel. Please
+produce a copy of your tickets while getting the reimbursement.
+
+  For any queries, poke us at admin@scipy.in.
+
+--
+ Thanks,
+ SciPy Team
--- a/scripts/mails.py	Thu Dec 03 01:45:17 2009 +0530
+++ b/scripts/mails.py	Sat Dec 05 09:39:02 2009 +0530
@@ -30,3 +30,21 @@
 
         talk.speaker.email_user(subject=subject, message=message,
                                 from_email='admin@scipy.in')
+
+def speaker_sponsorship():
+    """Sends a mail to each speaker whose talk has been accepted
+    informing them about the their sponsorship.
+    """
+
+    talks = Talk.objects.all()
+
+    template = 'notifications/speaker_sponsorship_mail.html'
+
+    for talk in talks:
+        subject = 'Details regarding your travel and accommodation 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')
\ No newline at end of file