Make prope use of jinja templating features
join is available in jinja-2.6, released in 2011.
This commit is contained in:
parent
573211150f
commit
e10ad0e745
@ -3,10 +3,7 @@
|
||||
{%- macro format_value(key, value) %}
|
||||
{#- Some settings, like virtual_alias_maps can take multiple values. Handle this case. -#}
|
||||
{%- if value is iterable and value is not string -%}
|
||||
{{ key }} {% for item in value -%}
|
||||
{{ item }}
|
||||
{%- if not loop.last %}, {% endif %}
|
||||
{%- endfor %}
|
||||
{{ key }} {{ value|join(", ") }}
|
||||
{%- else -%}
|
||||
{{ key }} {{ value }}
|
||||
{%- endif -%}
|
||||
|
Loading…
Reference in New Issue
Block a user