def process(self): subject = '«Сказка»: подтвердите email' task = ChangeCredentialsTaskPrototype.get_by_id(self.task_id) if task.account.id == get_system_user().id or task.account.is_bot: return True context = {'task': task} html_content = jinja2.render(self.EMAIL_HTML_TEMPLATE, context) text_content = jinja2.render(self.EMAIL_TEXT_TEMPLATE, context) return logic.send_mail([(task.account, task.new_email)], subject, text_content, html_content)
def process(self): subject = '«Сказка»: подтвердите email' task = ChangeCredentialsTaskPrototype.get_by_id(self.task_id) if task.account.id == get_system_user().id or task.account.is_bot: return True context = {'task': task} html_content = jinja2.render(self.EMAIL_HTML_TEMPLATE, context) text_content = jinja2.render(self.EMAIL_TEXT_TEMPLATE, context) return logic.send_mail([(task.account, task.new_email)], subject, text_content, html_content)
def task(self): return ChangeCredentialsTaskPrototype.get_by_id(self.task_id)
def task(self): return ChangeCredentialsTaskPrototype.get_by_id(self.task_id) def process(self, main_task):
def task(self): return ChangeCredentialsTaskPrototype.get_by_id(self.task_id) def process(self, main_task):