Fixed #32219 -- Made InlineModelAdmin.verbose_name_plural fallback to its verbose_name.

This commit is contained in:
Siburg 2020-11-23 17:37:53 +13:00 committed by Mariusz Felisiak
parent 1bd6a7a0ac
commit 46c8df640c
4 changed files with 67 additions and 6 deletions

View file

@ -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