def notifications(self): mails = [] for speaker in self.speakers_concerned: with override(speaker.locale), tzoverride(self.tz): notifications = get_template( 'schedule/speaker_notification.txt' ).render({'speaker': speaker, **self.speakers_concerned[speaker]}) context = template_context_from_event(self.event) context['notifications'] = notifications mails.append( self.event.update_template.to_mail( user=speaker, event=self.event, context=context, commit=False ) ) return mails
def notifications(self): """A list of unsaved :class:`~pretalx.mail.models.QueuedMail` objects to be sent on schedule release.""" mails = [] for speaker in self.speakers_concerned: with override(speaker.locale), tzoverride(self.tz): notifications = get_template( 'schedule/speaker_notification.txt' ).render({'speaker': speaker, **self.speakers_concerned[speaker]}) context = template_context_from_event(self.event) context['notifications'] = notifications mails.append( self.event.update_template.to_mail( user=speaker, event=self.event, context=context, commit=False ) ) return mails