inheritance.py
This file
Path
examples/basic/inheritance.py
13 lines · 392 bytes · Python
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than c580dd0 point at it.
update building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0
lines 1–13why, one step back1from jinja2 import Environment2from jinja2.loaders import DictLoader34env = Environment(5 loader=DictLoader(6 {7 "a": "[A[{% block body %}{% endblock %}]]",8 "b": "{% extends 'a' %}{% block body %}[B]{% endblock %}",9 "c": "{% extends 'b' %}{% block body %}###{{ super() }}###{% endblock %}",10 }11 )12)13print(env.get_template("c").render())