Created
April 22, 2015 09:42
-
-
Save sp3c73r2038/2b4db4bc0438e8a67fb8 to your computer and use it in GitHub Desktop.
Native usage of Jinja2
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, FileSystemLoader | |
env = Environment(loader=FileSystemLoader('templates')) | |
t = env.get_template('test.jinja2') | |
print(t.render(name='world')) |
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
hello, {{ name }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment