Found some of these in jinja files:
</extension> {%- else -%} <extension name="blabla">
And also
{% if freeswitch_dispatcher -%} <extension name="hold_unhold">
See the dashes ? Any idea what it's for ?
Variables. Template variables are defined by the context dictionary passed to the template. You can mess around with the variables in templates provided they are passed in by the application. Variables may have attributes or elements on them you can access too.
In the past it was possible to generate templates from a string with the default environment configuration by using jinja. from_string . Jinja 2 provides a Template class that can be used to do the same, but with optional additional configuration.
Turns out that +
and -
are there for whitespace control purpose.
You can manually disable the lstrip_blocks behavior by putting a plus sign (+) at the start of a block
[...]
You can also strip whitespace in templates by hand. If you put an minus sign (-) to the start or end of an block (for example a for tag), a comment or variable expression you can remove the whitespaces after or before that block
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With