[Django] #29232: Add title option for admin filter when providing a field name

10 views
Skip to first unread message

Django

unread,
Mar 16, 2018, 10:44:37 PM3/16/18
to django-...@googlegroups.com
#29232: Add title option for admin filter when providing a field name
-----------------------------------------+------------------------
Reporter: David Sanders | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
The generated title for admin filters when the field is on a related model
is often times confusing and not usable since it will be the name of the
field without any reference to the fact that it's on a related model
instead of the main model. When the field has the same name as a field on
the main model it appears as a duplicate as far as the user can tell.

This patch expands the existing tuple pattern for a `list_filter` item to
allow the second parameter to be a string which will be used as the title,
instead of only allowing a class inheriting from `FieldListFilter`. This
dove-tails nicely with the existing functionality as providing a subclass
of `FieldListFilter` allows you to easily provide a title on the class
itself, but the ability to provide just a string to use as a title removes
the need to subclass the correct class choice for the field type (which is
fragile) and streamlines the process for when you only want to change the
title.

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

Django

unread,
Mar 21, 2018, 8:23:04 PM3/21/18
to django-...@googlegroups.com
#29232: Add title option for admin filter when providing a field name
-------------------------------+------------------------------------

Reporter: David Sanders | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


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

Django

unread,
Mar 22, 2018, 6:36:02 AM3/22/18
to django-...@googlegroups.com
#29232: Add title option for admin filter when providing a field name
-------------------------------+------------------------------------

Reporter: David Sanders | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Carlton Gibson):

* needs_better_patch: 0 => 1


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

Django

unread,
May 1, 2020, 2:22:02 AM5/1/20
to django-...@googlegroups.com
#29232: Add title option for admin filter when providing a field name
-------------------------------+------------------------------------
Reporter: David Sanders | Owner: pdecol
Type: New feature | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

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


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

Django

unread,
May 1, 2020, 5:07:45 AM5/1/20
to django-...@googlegroups.com
#29232: Add title option for admin filter when providing a field name
-------------------------------+------------------------------------
Reporter: David Sanders | Owner: pdecol
Type: New feature | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by pdecol):

* needs_better_patch: 1 => 0


Comment:

[https://github.com/django/django/pull/12837 PR]

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

Django

unread,
Jun 25, 2020, 6:49:59 AM6/25/20
to django-...@googlegroups.com
#29232: Add title option for admin filter when providing a field name
-------------------------------+--------------------------------------

Reporter: David Sanders | Owner: pdecol
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by felixxm):

* status: assigned => closed
* resolution: => wontfix
* stage: Accepted => Unreviewed


Comment:

Proposed API is really confusing. There is already a clear and easy way to
customize a `title` by subclassing a filter classes. I know that shortcuts
are handy but isn't worth the additional complexity to the API. I
discussed with Carlton and we agreed to close the ticket as wontfix.

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

Reply all
Reply to author
Forward
0 new messages