mailer.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:vaultier 作者: Movile 项目源码 文件源码
def _render(self, context):
        """
        Renders the plain and html versions of a template.
        Return both in a tuple, where the first element is the plain text
        version and the second element is the html version
        :return: (str, str,)
        """
        if not context:
            context = Context({})

        plain = self.template_plain.render(context)
        html = self.template_html.render(context)
        css = get_template(self.template_style).render(Context({}))

        p = Pynliner()
        html = p.from_string(html).with_cssString(css).run()

        return plain, html
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号