Last active
October 18, 2018 14:31
-
-
Save dungdm93/b0d2d5eee4d8f59e9a2bae92722e3ab1 to your computer and use it in GitHub Desktop.
Render Jinja template
This file contains hidden or 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
import jinja2 | |
loader = jinja2.FileSystemLoader(searchpath="./") | |
env = jinja2.Environment(loader=loader) | |
TEMPLATE_FILE = "template.j2" | |
template = env.get_template(TEMPLATE_FILE) | |
output = template.render() | |
print(f"[{output}]") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment