New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtering 'bundles' #24
Comments
btw, its possible queryset.query.where.children could be munged into a Q. |
This problem can be solved if extra(select={'the_related_field'... is used, because re-querying is not then necessary. |
dfejgelis
pushed a commit
to dfejgelis/django-filter
that referenced
this issue
Mar 18, 2014
This is the same basic issue where filters force a join. |
OK — thanks — really helps to see where the work is needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no way currently to evaluate two filters together (AND vs OR on the relations queried):0
Given
A django filter oriented around Organization but with fields for 'zip_code' and 'open_saturday' cannot give you all organization within a particular zip code who are also open saturday.
One possible approach would be to create a filter_together option for Meta, which would be a list of tuples of field name bundles. If there is a way to garner a Q object from a queryset, one could loop through these bundles compiling Q objects and then filter them together. If not, perhaps an as_q() method could be added to a filter which returns a Q object instead.
Like my other Issue in this realm, I really don't mind submitting code if a design decision favors things like this.
The text was updated successfully, but these errors were encountered: