コード例 #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)
コード例 #2
0
ファイル: message_handlers.py プロジェクト: serhii73/the-tale
    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)
コード例 #3
0
ファイル: postponed_tasks.py プロジェクト: AtnesNess/the-tale
 def task(self):
     return ChangeCredentialsTaskPrototype.get_by_id(self.task_id)
コード例 #4
0
    def task(self): return ChangeCredentialsTaskPrototype.get_by_id(self.task_id)

    def process(self, main_task):
コード例 #5
0
    def task(self): return ChangeCredentialsTaskPrototype.get_by_id(self.task_id)

    def process(self, main_task):