#29219: Admin Changelist Filters Not Using Parsed Params
-----------------------------------------+------------------------
               Reporter:  David Sanders  |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  contrib.admin  |        Version:  2.0
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 Several of the admin changelist filter classes
 
[https://github.com/django/django/blob/master/django/contrib/admin/filters.py#L167
 pull parameters directly from `request.GET`] despite having a dict of
 parsed params passed in. I consider this a bug because it's a bit of a
 split-brain issue, some of the code works with the passed in params, some
 of it works directly with `request.GET`, so there's not one consistent
 place to change behavior regarding params. Specific use case I ran into:
 if you want a filter which 'expands' to providing values for multiple
 other filters, overriding `ChangeList.get_filters_params` would seem like
 the logical place to do the parameter expansion, but doing so yields
 inconsistent results due to the direct use of `request.GET` for pulling
 parameters in some filters but not others (specifically
 `DateFieldListFilter` and `SimpleListFilter` respond as you'd expect,
 other filters do not). Having the filters pull from the provided params
 closes this loop and makes things act consistently.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29219>
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.5ec2509767cf1f964514e1069e09bdb7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to