#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.7df616693be94ae19541e22f80c57075%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to