{% extends "admin/change_list.html" %} {% load admin_list %} {% comment %} Default change_list.html for django-api-factory. Extends Django's stock template and: 1. appends the ActionFormMixin modal at the end of the content block 2. injects a per-page selector in the pagination block (override of stock) Subclasses can override `change_list_template` to a different file if they don't want either piece. {% endcomment %} {% block pagination %} {{ block.super }} {% comment %}Per-page selector. NOT a `
` because we're inside the changelist-form (a POST form) and nested forms are invalid HTML — the browser would submit the OUTER form when the user clicks any button inside the inner form, losing `per_page` from the URL. Instead, we use pure JS to navigate: onchange + a visible "Apply" button both call `applyPerPage()`.{% endcomment %}

rows

{% endblock %} {% block extrastyle %} {{ block.super }} {% if api_factory_load_elementui_assets %} {% endif %} {% endblock %} {% block search %} {% if api_factory_use_elementui_filters %}
{% if cl.has_filters %} {% for spec in cl.filter_specs %} {% endfor %} {% endif %} Apply Clear
{% else %} {% comment %} Do not render Django's stock search block here. API-backed rows have dynamic fields, so the stock placeholder search input is not useful. {% endcomment %} {% if cl.has_filters %}
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
{% endif %} {% endif %} {% endblock %} {% block filters %} {% comment %} Hide the right-side filter nav — filters moved to the top. {% endcomment %} {% endblock %} {% block content %} {{ block.super }} {% include "admin/django_api_factory/action_form_modal.html" %} {% endblock %} {% block extrahead %} {{ block.super }} {% if api_factory_load_elementui_assets %} {% endif %} {% endblock %}