{{wrapper.name}}
{% if perms|has_perm:PERM_WRITE %}{% endif %}
{% if perms|has_perm:PERM_DELETE %}{% endif %}
{% include "view/model_fields.html" %}
{% if wrapper.parent %}
{% for field, wrapper in wrapper.parent.items %}
{% for field, wrapper in wrapper.one_to_many.items %}
{{wrapper.name}}
{% if instance|get:field %}
{% with instance|get:field|f:'all' as instances %}
{% include "view/list_instances.html" %}
{% endwith %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% for field, wrapper in wrapper.one_to_one.items %}
{{wrapper.name}}
{% with instance|get:field as instance %}
{% include "view/model_fields.html" %}
{% endwith %}
{% endfor %}
{% for field, wrapper in wrapper.one_to_many.items %}
{{wrapper.name}}
{% if instance|get:field %}
{% with instance|get:field|f:'all' as instances %}
{% include "view/list_instances.html" %}
{% endwith %}
{% endif %}
{% endfor %}
{% endblock %}