{% load form_helpers %} {% load i18n %} {% load custom_object_utils %} {# Render all visible form fields with poly grouping headings. #} {# Used by both the bulk edit page and the HTMX partial reload. #} {% for field in form.visible_fields %} {% if field.name in form.meta_fields %} {# Handled separately in the meta section. #} {% elif field.name in form.custom_object_type_poly_obj_ct_names %} {# Polymorphic single-object pair: heading + type selector + object picker #} {% with pair=form.custom_object_type_poly_obj_pairs|dict_get:field.name %}