11 - variable x has content: {{ x }}
12 - expression: {{ x + 1 }}
13 - escaped for HTML: {{ x | e }}
16 ### Control structures
19 {% for x in range(5) %}
28 ### Whitespace trimming
43 {% filter e %}{% endraw %}
44 { {%- if 0 -%}{%- endif -%} % raw %}
46 This is a raw block where {{nothing is evaluated}}
48 and <html is escaped> too with "e" filter
50 { {%- if 0 -%}{%- endif -%} % endraw %}{% raw %}
54 this is a reusable macro, with arguments: {{x}}
72 <title>{%block title %}{% endblock %}</title>
75 <header><h1>{% block title %}{% endblock %}</h1></header>
76 <main>{% block content %}{% endblock %}</main>
84 {% extends "shared.html" %}
85 {% block title %}Welcome to my site{% endblock %}
96 from jinja2 import Template
97 template = Template('Hello {{ name }}!')
98 template.render(name='John Doe') == u'Hello John Doe!'