003 File Manager
Current Path:
/usr/local/share/examples/py38-Jinja2/basic
usr
/
local
/
share
/
examples
/
py38-Jinja2
/
basic
/
📁
..
📁
__pycache__
📄
cycle.py
(301 B)
📄
debugger.py
(223 B)
📄
inheritance.py
(392 B)
📁
templates
📄
test.py
(675 B)
📄
test_filter_and_linestatements.py
(456 B)
📄
test_loop_filter.py
(301 B)
📄
translate.py
(544 B)
Editing: cycle.py
from jinja2 import Environment env = Environment( line_statement_prefix="#", variable_start_string="${", variable_end_string="}" ) print( env.from_string( """\ <ul> # for item in range(10) <li class="${loop.cycle('odd', 'even')}">${item}</li> # endfor </ul>\ """ ).render() )
Upload File
Create Folder