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.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/29232#comment:1>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/29232#comment:2>
* owner: nobody => pdecol
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/29232#comment:3>
* needs_better_patch: 1 => 0
Comment:
[https://github.com/django/django/pull/12837 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/29232#comment:4>
* 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>