Templates¶
Expressions¶
In block and var tags, a subset of Python syntax is supported.
Literals:
{{ "foo" }}
{{ 1 }}
{{ 24.96 }}
Attribute lookup:
{{ foo.bar }}
Subscript lookup:
{{ foo[bar] }}
{{ foo["bar"] }}
{{ foo[1] }}
Function calls:
{{ foo() }}
{{ foo(bar, 1.4, "test") }}
And these actions can be chained:
{{ foo['test'].bar(1).baz }}