diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/checks.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 16 | ||||
| -rw-r--r-- | docs/releases/6.1.txt | 5 |
3 files changed, 23 insertions, 0 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt index fb9187c2ac..5b4e31420b 100644 --- a/docs/ref/checks.txt +++ b/docs/ref/checks.txt @@ -816,6 +816,8 @@ with the admin site: method for the ``<action>`` action. * **admin.E130**: ``__name__`` attributes of actions defined in ``<modeladmin>`` must be unique. Name ``<name>`` is not unique. +* **admin.E131**: The value of ``delete_confirmation_max_display`` must be a + non-negative integer or ``None``. ``InlineModelAdmin`` ~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index b3c7c2c426..4b0e4a985d 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -1386,6 +1386,21 @@ default templates used by the :class:`ModelAdmin` views: for displaying a confirmation page when deleting one or more objects. See the :doc:`actions documentation</ref/contrib/admin/actions>`. +.. attribute:: ModelAdmin.delete_confirmation_max_display + + .. versionadded:: 6.1 + + Set ``delete_confirmation_max_display`` to control how many objects are + displayed on the delete confirmation pages before truncating the remainder + with an ellipsis. + + The limit applies to the total number of displayed objects across the + relationship hierarchy. This is purely a display setting and does not + affect the total number of objects retrieved from the database. + + This applies to both :meth:`delete_view` and the ``delete_selected`` + action. By default, this is ``None`` (no truncation). + .. attribute:: ModelAdmin.object_history_template Path to a custom template, used by :meth:`history_view`. @@ -2283,6 +2298,7 @@ adds some of its own (the shared features are actually defined in the - :attr:`~ModelAdmin.fieldsets` - :attr:`~ModelAdmin.fields` - :attr:`~ModelAdmin.formfield_overrides` +- :attr:`~ModelAdmin.delete_confirmation_max_display` - :attr:`~ModelAdmin.exclude` - :attr:`~ModelAdmin.filter_horizontal` - :attr:`~ModelAdmin.filter_vertical` 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 <field-choices-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 |
