cycle.py
This file
Path
examples/basic/cycle.py
13 lines · 277 bytes · Python
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 44e1f56 point at it.
master will be 2.6Armin Ronacherbefore adoption44e1f56
lines 1–13why, one step back1from jinja2 import Environment234env = Environment(line_statement_prefix="#", variable_start_string="${", variable_end_string="}")567print env.from_string("""\8<ul>9# for item in range(10)10 <li class="${loop.cycle('odd', 'even')}">${item}</li>11# endfor12</ul>\13""").render()