Created
May 5, 2019 04:27
-
-
Save hxer/b9ea6d429263e91254f5b55670ec4cb3 to your computer and use it in GitHub Desktop.
jinja2渲染HTML邮件
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
from jinja2 import Environment | |
from jinja2 import FileSystemLoader | |
if __name__ == "__main__" | |
data = {} | |
env = Environment(loader=FileSystemLoader('{0}/templates/'.format(os.path.dirname(__file__)))) | |
template = env.get_template('risk_rule_daily.html') | |
html = template.render(**data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment