https://code.djangoproject.com/ticket/27303#trac-add-comment

Hi all,

I am looking to drum up more feedback about this issue as I think an 
important design decision needs to be made regarding filtering in the 
admin. At the heart of this issue is the syntax simplicity of repeating 
filter() clauses on a queryset breaks down pretty quickly when you are 
talking about traversing relations. The current FilterSpec API was a huge 
improvement, but shuttling filter() clauses between objects leaves a lot to 
be desired in terms of joining and leaves what I see as a critical 
inconsistency when it comes to adding several filters across relations (the 
way it is now, each filter gets its own JOIN and the result is a rather 
ambiguous OR-like clause).

There are also related issues at play, such as providing hooks for 
developers to apply filters that do more than just AND. While my ticket 
doesn't hope to address that comprehensively, I do think that some 
interesting options come into play when we stop authoring FilterSpecs to 
chain filters() and instead return Q-like objects which are then applied by 
the ModelAdmin or AdminSite.

-Steve

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/48f5411d-bcf2-4af3-b863-0dd6484618a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to