From 46c8df640cfed5dd525ac1bcf5ad7e57b7ff2571 Mon Sep 17 00:00:00 2001 From: Siburg Date: Mon, 23 Nov 2020 17:37:53 +1300 Subject: Fixed #32219 -- Made InlineModelAdmin.verbose_name_plural fallback to its verbose_name. --- docs/ref/contrib/admin/index.txt | 14 ++++++++++---- docs/releases/4.0.txt | 3 +++ 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index fc1eab44f1..e787349d5f 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -2453,13 +2453,19 @@ The ``InlineModelAdmin`` class adds or customizes: .. attribute:: InlineModelAdmin.verbose_name - An override to the ``verbose_name`` found in the model's inner ``Meta`` - class. + An override to the :attr:`~django.db.models.Options.verbose_name` from the + model's inner ``Meta`` class. .. attribute:: InlineModelAdmin.verbose_name_plural - An override to the ``verbose_name_plural`` found in the model's inner - ``Meta`` class. + An override to the :attr:`~django.db.models.Options.verbose_name_plural` + from the model's inner ``Meta`` class. If this isn't given and the + :attr:`.InlineModelAdmin.verbose_name` is defined, Django will use + :attr:`.InlineModelAdmin.verbose_name` + ``'s'``. + + .. versionchanged:: 4.0 + + The fallback to :attr:`.InlineModelAdmin.verbose_name` was added. .. attribute:: InlineModelAdmin.can_delete diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt index 7ae566d43a..8f910ad9db 100644 --- a/docs/releases/4.0.txt +++ b/docs/releases/4.0.txt @@ -85,6 +85,9 @@ Minor features * The new :attr:`.ModelAdmin.search_help_text` attribute allows specifying a descriptive text for the search box. +* The :attr:`.InlineModelAdmin.verbose_name_plural` attribute now fallbacks to + the :attr:`.InlineModelAdmin.verbose_name` + ``'s'``. + :mod:`django.contrib.admindocs` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3