Пример #1
0
 def final_notify(self):
     if self.final_notification_sent:
         return
     self.refresh_documents()
     for code, info in self.info_by_code.items():
         str(self.final_notification_email[code])
     if len(self.additional_people_to_notify):
         str(self.final_notification_email_to_others)
     for code, info in self.info_by_code.items():
         send_email(to=info['signer'],
                    template=self.final_notification_email[code],
                    attachments=self.list_of_documents())
     for person in self.additional_people_to_notify:
         send_email(to=person,
                    template=self.final_notification_email_to_others,
                    attachments=self.list_of_documents())
     self.final_notification_sent = True
     if interface() == 'worker':
         background_response()
Пример #2
0
 def initial_notify(self):
     if self.initial_notification_sent:
         return
     self.rationalize()
     for code, info in self.info_by_code.items():
         if not info['signed']:
             str(self.initial_notification_email[code])
     if len(self.additional_people_to_notify):
         str(self.final_notification_email_to_others)
     for code, info in self.info_by_code.items():
         if not info['signed']:
             send_email(to=info['signer'],
                        template=self.initial_notification_email[code])
     for person in self.additional_people_to_notify:
         send_email(to=person,
                    template=self.final_notification_email_to_others)
     self.initial_notification_sent = True
     if interface() == 'worker':
         background_response()