Skip to content
Myr

cycle.py

This file

Path

examples/basic/cycle.py

18 lines · 340 bytes · Python

Last changed by

Merge pull request #1133 from pallets/revert-renameDavid Lordbefore adoption15337f7

History of this file

Take it

The walk stopped after 200 commits: lines older than 0020a47 point at it.

Merge pull request #1093 from cclauss/print-functionDavid Lordbefore adoption4c95c5f

line 1why, one step back
1from __future__ import print_function

Merge pull request #1125 from pallets/styleDavid Lordbefore adoption42d4a4e

line 2why, one step back
2

Merge pull request #1133 from pallets/revert-renameDavid Lordbefore adoption15337f7

line 3why, one step back
3from jinja2 import Environment

Added a more convenient autoescaping functionArmin Ronacherbefore adoption0020a47

line 4why, one step back
4

Merge pull request #1125 from pallets/styleDavid Lordbefore adoption42d4a4e

lines 5–10why, one step back
5env = Environment(
6 line_statement_prefix="#", variable_start_string="${", variable_end_string="}"7)8print(9 env.from_string(10 """\

Added a more convenient autoescaping functionArmin Ronacherbefore adoption0020a47

lines 11–15why, one step back
11<ul>
12# for item in range(10)13 <li class="${loop.cycle('odd', 'even')}">${item}</li>14# endfor15</ul>\

Merge pull request #1125 from pallets/styleDavid Lordbefore adoption42d4a4e

lines 16–18why, one step back
16"""
17 ).render()18)