Skip to content
Myr

test.py

This file

Path

examples/basic/test.py

27 lines · 612 bytes · Python

Last changed by

change py2 print statements to py3Kartheek Lenkalabefore adoption29b08c8

History of this file

Take it

The walk stopped after 200 commits: lines older than 1c5f1e8 point at it.

Merge branch 'lkarthee-pytest_migration'Markus Unterwaditzerbefore adoption1c5f1e8

lines 1–26why, one step back
1from jinja2 import Environment
2from jinja2.loaders import DictLoader34env = Environment(loader=DictLoader({5'child.html': u'''\6{% extends master_layout or 'master.html' %}7{% include helpers = 'helpers.html' %}8{% macro get_the_answer() %}42{% endmacro %}9{% title = 'Hello World' %}10{% block body %}11 {{ get_the_answer() }}12 {{ helpers.conspirate() }}13{% endblock %}14''',15'master.html': u'''\16<!doctype html>17<title>{{ title }}</title>18{% block body %}{% endblock %}19''',20'helpers.html': u'''\21{% macro conspirate() %}23{% endmacro %}22'''23}))242526tmpl = env.get_template("child.html")

change py2 print statements to py3Kartheek Lenkalabefore adoption29b08c8

line 27why, one step back
27print(tmpl.render())