{% from 'utils.html' import apply_dattrs, apply_classes %} {% macro dictlist_dl(data, filterkeys=[], filtervals=[], classes=[], data_attrs=[], asdict=False) %} {# Make a definition list from a dictionary - the correspondence should be dt: key, dd: value Usage: {{ dictlist_dl({'foo': 'bar'}) }}
{{ header_macros[heading](heading) }} | {% else %}{{ heading }} | {% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% for obj in objs %} {% if order %} {% set obj = obj|sort_dict_keys_from_reflist(order) %} {% else %} {% set obj = obj.items() %} {% endif %}
---|---|
{# Handle all primary key links, a common occurence #} {% if pk_link and k == 'id' %} {{ v }} {% elif handle_links and v|is_url %} {{ v }} {% elif k in field_macros.keys() %} {# If a field macro is specified by key, call it on this field for arbitrary levels of customization #} {{ field_macros[k](v) }} {% else %} {{ v }} {% endif %} | {% else %}{% endif %} {% endif %} {% endfor %} |
Error(s) for '{{ field }}':