{% load common_filters %} {% if not field.nested_formsets %} {% if field.forms|type_name == "list" %} {% include "common/form/formset.html" with formset=field sub_group=False %} {% elif field.items %} {% include "common/form/layout_groups.html" with groups=field sub_group=group_name|neq:"wrapper" %} {% else %} {% include field.field.template_name|default:"common/form/field.html" %} {% endif %} {% else %} {% for nested_form in field.nested_formsets %} {% include "common/form/formset.html" with formset=nested_form sub_group=False %} {% endfor %} {% endif %}