Conditions | 2 |
Total Lines | 14 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from html import escape as html_escape |
||
20 | def __init__(self): |
||
21 | super().__init__( |
||
22 | loader=jinja2.FileSystemLoader(searchpath=['templates']), |
||
23 | autoescape=True, |
||
24 | trim_blocks=True, |
||
25 | lstrip_blocks=True, |
||
26 | undefined=jinja2.StrictUndefined, |
||
27 | ) |
||
28 | |||
29 | @self.glob |
||
30 | def iterate(v): |
||
31 | if isinstance(v, Undefined): |
||
32 | return v |
||
33 | return h_iterate(v) |
||
34 | |||
51 |