Created
September 15, 2010 17:34
-
-
Save groner/581104 to your computer and use it in GitHub Desktop.
Simplest jinja2 setup
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
from jinja2.environment import Environment as Jinja2Environment | |
from jinja2.loaders import FileSystemLoader as Jinja2FileSystemLoader | |
def main(): | |
env = Jinja2Environment( | |
loader=Jinja2FileSystemLoader('.'), | |
) | |
t = env.get_template('test.jinja') | |
print t.render() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment