inheritance.py
This file
Path
examples/basic/inheritance.py
12 lines · 341 bytes · Python
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than d0b3541 point at it.
Merge pull request #239 from msabramo/tox_posargsMarkus Unterwaditzerbefore adoptiond0b3541
lines 1–12why, one step back1from jinja2 import Environment2from jinja2.loaders import DictLoader345env = Environment(loader=DictLoader({6'a': '''[A[{% block body %}{% endblock %}]]''',7'b': '''{% extends 'a' %}{% block body %}[B]{% endblock %}''',8'c': '''{% extends 'b' %}{% block body %}###{{ super() }}###{% endblock %}'''9}))101112print env.get_template('c').render()