cycle.py
This file
Path
examples/basic/cycle.py
16 lines · 301 bytes · Python
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than beabf30 point at it.
Merge pull request #1383 from pallets/test-decoratorsDavid Lordbefore adoptionbeabf30
lines 1–16why, one step back1from jinja2 import Environment23env = Environment(4 line_statement_prefix="#", variable_start_string="${", variable_end_string="}"5)6print(7 env.from_string(8 """\9<ul>10# for item in range(10)11 <li class="${loop.cycle('odd', 'even')}">${item}</li>12# endfor13</ul>\14"""15 ).render()16)