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