{% load maintain_extras %} {% if wrapper.children %} {% for field, wrapper in wrapper.children.items %} {% if instance|get:field %} {% with instance|get:field as instance %} {% for field, wrapper in wrapper.many_to_one.items %} {% with instance|get:field as instance %}