cycle.py
This file
Path
examples/basic/cycle.py
16 lines · 301 bytes · Python
Last changed by
Merge pull request #1136 from pallets/drop-python2David Lordbefore adoption3915eb5
History of this fileTake it
The walk stopped after 200 commits: lines older than 2e950f0 point at it.
Merge pull request #1133 from pallets/revert-renameDavid Lordbefore adoption15337f7
line 1why, one step back1from jinja2 import EnvironmentMerge pull request #994 from bkiu/931-undeclared-variablesDavid Lordbefore adoption2e950f0
line 2why, one step back2Merge pull request #1125 from pallets/styleDavid Lordbefore adoption42d4a4e
lines 3–8why, one step back3env = Environment(4 line_statement_prefix="#", variable_start_string="${", variable_end_string="}"5)6print(7 env.from_string(8 """\Merge pull request #994 from bkiu/931-undeclared-variablesDavid Lordbefore adoption2e950f0
lines 9–13why, one step back9<ul>10# for item in range(10)11 <li class="${loop.cycle('odd', 'even')}">${item}</li>12# endfor13</ul>\Merge pull request #1125 from pallets/styleDavid Lordbefore adoption42d4a4e
lines 14–16why, one step back14"""15 ).render()16)