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()
)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| templates | Folder | 0755 |
|
|
| cycle.py | File | 301 B | 0644 |
|
| debugger.py | File | 223 B | 0644 |
|
| inheritance.py | File | 392 B | 0644 |
|
| test.py | File | 675 B | 0644 |
|
| test_filter_and_linestatements.py | File | 456 B | 0644 |
|
| test_loop_filter.py | File | 301 B | 0644 |
|
| translate.py | File | 544 B | 0644 |
|