Skip to content
Myr

layout.py

This file

Path

tests/runtime/layout.py

13 lines · 389 bytes · Python

Last changed by

[svn] moved all jinja tests into a runtime folder so that we have enough space for the new unittestsArmin Ronacherbefore adoptionaa5adfa

History of this file

Take it

1from jinja import Environment, FileSystemLoader2e = Environment(loader=FileSystemLoader('templates'))34from jinja.parser import Parser5from jinja.translators.python import PythonTranslator67print PythonTranslator(e, e.loader.parse('index.html')).translate()89tmpl = e.loader.load('index.html')10print tmpl.render(navigation_items=[{11    'url':          '/',12    'caption':      'Index'13}])