scripts/mails.py
changeset 82 a123369b0901
parent 61 959ec5eaafb1
equal deleted inserted replaced
81:d03e5260947e 82:a123369b0901
   121             template, dictionary={'name': talk.speaker.username,
   121             template, dictionary={'name': talk.speaker.username,
   122                                   'title': talk.title})
   122                                   'title': talk.title})
   123 
   123 
   124         talk.speaker.email_user(subject=subject, message=message,
   124         talk.speaker.email_user(subject=subject, message=message,
   125                                 from_email='admin@scipy.in')
   125                                 from_email='admin@scipy.in')
       
   126 
       
   127 def proceedings_detail():
       
   128     """Sends a mail to each speaker informing them about proceedings
       
   129     """
       
   130 
       
   131     talks = Talk.objects.all()
       
   132 
       
   133     template = 'notifications/proceedings_detail_mail.html'
       
   134 
       
   135     for talk in talks:
       
   136         subject = 'SciPy.in 2009 Proceedings'
       
   137         message = loader.render_to_string(
       
   138             template, dictionary={'name': talk.speaker.username})
       
   139 
       
   140         talk.speaker.email_user(subject=subject, message=message,
       
   141                                 from_email='admin@scipy.in')