Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
 def task(self):
     return ChangeCredentialsTaskPrototype.get_by_id(self.task_id)
Esempio n. 4
0
    def task(self): return ChangeCredentialsTaskPrototype.get_by_id(self.task_id)

    def process(self, main_task):
Esempio n. 5
0
    def task(self): return ChangeCredentialsTaskPrototype.get_by_id(self.task_id)

    def process(self, main_task):