#27559: Admin changelist turns GET QueryDict into dict which may lose parameters
-------------------------------------+-------------------------------------
     Reporter:  Jonas von Poser      |                    Owner:  Ling-Xiao
         Type:                       |  Yang
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.admin        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Ling-Xiao Yang):

 This may also require a change in
 `django.contrib.admin.filters.ListFilter.__init__()`. This init method now
 accepts the argument `params` that has to be a `dict` object and is passed
 from `ChangeList.get_filter()`, and eventually from `ChangeList.params`.
 Even if we replace `ChangeList.params` as a `QueryDict`, it is still
 difficult to pass the multiple GET values to the admin filter classes
 while having their init `params` as a `dict` object.

 It should require a change in the admin filter `__init__()` definition,
 unless it would be safe to iterate through all these GET values that have
 the same key, pass one value to the filter every time (while not exposing
 other values), and use `Q() | Q()` to link them in
 `ChangeList.get_filter()` or `ChangeList.get_queryset()`, in order to keep
 the filter part unchanged. I think this would be the minimal drawback to
 fix this issue right now, as developers are more supposed to access GET
 values in filter's argument `request` in documented methods `lookups(self,
 request, model_admin)` and `queryset(self, request, queryset)` but not
 `__init__()`.

--
Ticket URL: <https://code.djangoproject.com/ticket/27559#comment:3>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.94f1347a77a97506316c9c65269e0259%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to