예제 #1
0
 def notify(self):
     context = {
         "site": Site.objects.get_current(),
         "first_name": self.user.first_name,
         "title": self.proposal.title,
     }
     send_email(context=context,
                template="emails/reviewers/new.html",
                subject=_("[%s] Tienes una nueva propuesta para revisar") %
                settings.CONFERENCE_TITLE,
                to=self.user.email,
                from_email="%s <%s>" %
                (settings.CONFERENCE_TITLE, settings.CONTACT_EMAIL))
예제 #2
0
 def notify(self):
     """Sends an email to the creator of the proposal with a confirmation email. The emails has a
     link to edit the proposal.
     """
     if not self.code:
         self.code = random_string(64)
     for speaker in self.speakers.all():
         context = self.notification_email_context(speaker=speaker)
         send_email(context=context,
                    template="emails/proposals/confirmation.html",
                    subject=_("[%s] Confirmación de propuesta de charla") %
                    settings.CONFERENCE_TITLE,
                    to=speaker.email,
                    from_email=settings.CONTACT_EMAIL)
     self.notified = True
     self.save()
예제 #3
0
 def notify_acceptance(self):
     """Sends an email to the creator of the proposal with an email with the resolution of the acceptance or not
     of his proposal.
     """
     for speaker in self.speakers.all():
         context = self.notification_email_context(speaker=speaker)
         if self.accepted is None:
             return
         template = "emails/proposals/accepted.html" if self.accepted else "emails/proposals/rejected.html"
         send_email(context=context,
                    template=template,
                    subject=_("[%s] Notificación de propuesta de charla") %
                    settings.CONFERENCE_TITLE,
                    to=self.speaker.email,
                    from_email=settings.CONTACT_EMAIL)
     self.accepted_notified = True
     self.save()