From fa2a3de6ede10b005fc2c1d23f4cffb53eaec425 Mon Sep 17 00:00:00 2001 From: Rodrigo Vieira Date: Wed, 22 Apr 2026 18:53:27 -0300 Subject: Fixed #10919 -- Added delete_confirmation_max_display to ModelAdmin. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new ModelAdmin.delete_confirmation_max_display attribute allows limiting the number of related objects shown on the delete confirmation page. When the limit is reached, a "…and N more objects." message is shown. The feature relies on a new truncated_unordered_list template filter added to django.contrib.admin.templatetags.admin_filters. Thanks Jacob Tyler Walls for the review and guidance, Tobias McNulty for the report, and terminator14 for the solution suggested. --- docs/releases/6.1.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/releases') diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index a4e10d2102..48f8939041 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -99,6 +99,11 @@ Minor features preserve :ref:`named groups ` (e.g. ``choices=[("Group", [("1", "Item")]), ...]``). +* The :attr:`~django.contrib.admin.ModelAdmin.delete_confirmation_max_display` + option allows customizing how many objects are displayed on admin delete + confirmation pages before the remainder is truncated. The default is + ``None`` (no truncation). + * In order to improve accessibility of the admin change forms: * Form fields are now shown below their respective labels instead of next to -- cgit v1.3