Skip to content
Myr

test.py

This file

Path

examples/basic/test.py

29 lines · 679 bytes · Python

Last changed by

Merge branch 'stable'David Lordbefore adoption6aeab5d

History of this file

Take 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–7why, one step back
1from jinja2 import Environment
2from jinja2.loaders import DictLoader34env = Environment(5 loader=DictLoader(6 {7 "child.html": """\

Merge remote-tracking branch 'origin/3.0.x'David Lordbefore adoptionf1c51b3

line 8why, one step back
8{% extends default_layout or 'default.html' %}

Merge branch 'stable'David Lordbefore adoption6aeab5d

line 9why, one step back
9{% import 'helpers.html' as helpers %}

update building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0

line 10why, one step back
10{% macro get_the_answer() %}42{% endmacro %}

Merge branch 'stable'David Lordbefore adoption6aeab5d

line 11why, one step back
11{% set title = 'Hello World' %}

update building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0

lines 12–16why, one step back
12{% block body %}
13 {{ get_the_answer() }}14 {{ helpers.conspirate() }}15{% endblock %}16""",

Merge remote-tracking branch 'origin/3.0.x'David Lordbefore adoptionf1c51b3

line 17why, one step back
17 "default.html": """\

update building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0

lines 18–29why, one step back
18<!doctype html>
19<title>{{ title }}</title>20{% block body %}{% endblock %}21""",22 "helpers.html": """\23{% macro conspirate() %}23{% endmacro %}24""",25 }26 )27)28tmpl = env.get_template("child.html")29print(tmpl.render())