layout.py
This file
Path
tests/runtime/layout.py
13 lines · 392 bytes · Python
Last changed by
converted unit tests, started rewriting filtersChristoph Hackbefore adoptione9e43bb
History of this fileTake it
The walk stopped after 200 commits: lines older than 1f1823c point at it.
converted unit tests, started rewriting filtersChristoph Hackbefore adoptione9e43bb
line 1why, one step back1from jinja2 import Environment, FileSystemLoader[svn] jinja webpage without annyoing .html suffixes nowArmin Ronacherbefore adoption1f1823c
lines 2–3why, one step back2e = Environment(loader=FileSystemLoader('templates'))3converted unit tests, started rewriting filtersChristoph Hackbefore adoptione9e43bb
lines 4–5why, one step back4from jinja2.parser import Parser5from jinja2.translators.python import PythonTranslator[svn] jinja webpage without annyoing .html suffixes nowArmin Ronacherbefore adoption1f1823c
lines 6–13why, one step back67print 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}])