[Django] #32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural

36 views
Skip to first unread message

Django

unread,
Nov 22, 2020, 1:58:41 AM11/22/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: nobody
Type: New | Status: new
feature |
Component: | Version: 3.1
contrib.admin | Keywords: Admin Inline
Severity: Normal | verbose_name_plural
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Django allows specification of a verbose_name and a verbose_name_plural
for Inline classes in admin views. However, verbose_name_plural for an
Inline is not currently based on a specified verbose_name. Instead, it
continues to be based on the model name, or an a verbose_name specified in
the model's Meta class. This was confusing to me initially (I didn't
understand why I had to specify both name forms for an Inline if I wanted
to overrule the default name), and seems inconsistent with the approach
for a model's Meta class (which does automatically base the plural form on
a specified verbose_name). I propose that verbose_name_plural for an
Inline class should by default be based on the verbose_name for an Inline
if that is specified.

I have written a patch to implement this, including tests. Would be happy
to submit that.

--
Ticket URL: <https://code.djangoproject.com/ticket/32219>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 22, 2020, 1:59:25 AM11/22/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage:
verbose_name_plural | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Siburg):

* owner: nobody => Siburg
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:1>

Django

unread,
Nov 22, 2020, 5:43:21 AM11/22/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage:
verbose_name_plural | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

Please push your patch as a [https://github.com/django/django/pulls Django
pull request].

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:2>

Django

unread,
Nov 22, 2020, 11:59:10 PM11/22/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage:
verbose_name_plural | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Siburg):

Replying to [comment:2 Claude Paroz]:


> Please push your patch as a [https://github.com/django/django/pulls
Django pull request].

Pull request is here: https://github.com/django/django/pull/13710

Does not yet contain documentation updates because I'm not sure where
those should go. Failed the isort test because I did not change existing
order of imports. Would be happy to make that change.

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:3>

Django

unread,
Nov 23, 2020, 1:45:15 PM11/23/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage:
verbose_name_plural | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Siburg):

Responded to code review comment, and changed the import ordering and
formatting while I was at it so it now passes the isort test as well.

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:4>

Django

unread,
Nov 23, 2020, 3:09:32 PM11/23/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_docs: 0 => 1
* stage: Unreviewed => Accepted


Comment:

Sounds reasonable, thanks. Docs changes are missing, e.g. a release note
about backwards incompatibility

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:5>

Django

unread,
Nov 24, 2020, 3:57:03 AM11/24/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Siburg):

Added
* The default ``verbose_name_plural`` for an ``InlineModelAdmin``
(sub-)class
is now its ``verbose_name + 's'`` if the ``verbose_name`` is specified
in
that ``InlineModelAdmin`` (sub-)class, instead of being the
``verbose_name_plural`` for the model class.

under the django.contrib.admin heading in the "Backwards incompatible
changes in 3.2" of the version 3.2 release notes.

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:6>

Django

unread,
Nov 26, 2020, 3:31:56 AM11/26/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Siburg):

* needs_docs: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:7>

Django

unread,
Nov 30, 2020, 12:09:21 AM11/30/20
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Siburg):

Updated documentation as well. Figured out where it should go.

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:8>

Django

unread,
Feb 16, 2021, 3:24:16 AM2/16/21
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by David Smith):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:9>

Django

unread,
Feb 20, 2021, 7:44:47 PM2/20/21
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Siburg):

Will do.

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:10>

Django

unread,
Jun 26, 2021, 11:31:28 PM6/26/21
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 4.0

Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Siburg):

* needs_better_patch: 1 => 0
* version: 3.1 => 4.0


Comment:

Updated documentation to reflect anticipated inclusion in version 4.0,
added a versionchanged block and included links in the documentation.

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:11>

Django

unread,
Jun 30, 2021, 6:55:20 AM6/30/21
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:12>

Django

unread,
Sep 8, 2021, 6:12:38 AM9/8/21
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Accepted
verbose_name_plural |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"1bd6a7a0acc11e249fca11c017505ad39f15ebf6" 1bd6a7a]:
{{{
#!CommitTicketReference repository=""
revision="1bd6a7a0acc11e249fca11c017505ad39f15ebf6"
Refs #32219 -- Added admin model inline tests for verbose names.

Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:13>

Django

unread,
Sep 8, 2021, 7:24:06 AM9/8/21
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: assigned
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution:
Keywords: Admin Inline | Triage Stage: Ready for
verbose_name_plural | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:14>

Django

unread,
Sep 8, 2021, 2:34:02 PM9/8/21
to django-...@googlegroups.com
#32219: Use Admin Inline verbose_name as default for Inline verbose_name_plural
-------------------------------------+-------------------------------------
Reporter: Siburg | Owner: Siburg
Type: New feature | Status: closed
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution: fixed

Keywords: Admin Inline | Triage Stage: Ready for
verbose_name_plural | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"46c8df640cfed5dd525ac1bcf5ad7e57b7ff2571" 46c8df6]:
{{{
#!CommitTicketReference repository=""
revision="46c8df640cfed5dd525ac1bcf5ad7e57b7ff2571"
Fixed #32219 -- Made InlineModelAdmin.verbose_name_plural fallback to its
verbose_name.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32219#comment:15>

Reply all
Reply to author
Forward
0 new messages