#5833: [newforms-admin] Custom FilterSpecs
---------------------------------------------+------------------------------
Reporter: Honza_Kral | Owner: jkocherhans
Status: assigned | Milestone:
Component: django.contrib.admin | Version: SVN
Resolution: | Keywords: nfa-someday
list_filter filterspec nfa-changelist ep2008
Stage: Design decision needed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 1 |
---------------------------------------------+------------------------------
Comment (by gerdemb):
I updated the patch to the latest HEAD and fixed the TODO comments. In
order to pass the existing tests, I had to disable the use of custom GET
params. In the original patch, the filterspec could consume a custom param
and then return an arbitrary queryset based on this parameter, but to do
this it silently removed the parameters that don't match a field name from
the request. The problem is that there is a test to insure that any
parameters that do not match field names are handled by forwarding to ?e=1
(testIncorrectLookupParameters) which failed when the previous patch
silently removed them. Additionally, the code in the previous patch didn't
handle filters on M2M relationships through an intermediate table because
it assumed the first part of the search param would be a field name.
--
Ticket URL: <http://code.djangoproject.com/ticket/5833#comment:29>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---