Skip to content
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

Support filter(*args) #76

Merged
merged 1 commit into from
Nov 26, 2020
Merged

Support filter(*args) #76

merged 1 commit into from
Nov 26, 2020

Conversation

jpic
Copy link
Contributor

@jpic jpic commented Nov 18, 2020

Hi Patrick,

Some user contributed query building code similar to what django.contrib.admin does for search_fields.

This broke QSS support for two reasons:

  • it combines Q objects with | and then calls qss.filter(built_filter)
  • because of that, there is also code to detect if one of the filter is on an M2M table in which case it knowns it needs to call distinct

What do you think of this proposal ? We have a patch ready in DAL and I can still do any changes to fit the design decisions that you may want to make.

Thank you for your feedback

@clokep
Copy link
Owner

clokep commented Nov 18, 2020

@jpic The changes for filter() make sense, but I'm not so sure about the distinct() changes. See #31 for why that is a bit trickier. Maybe we can split this into two PRs for discussion?

@jpic
Copy link
Contributor Author

jpic commented Nov 18, 2020

Removed distinct from this PR, making another one for distinct, thank you !

@jpic jpic changed the title Support filter(*args) and .distinct() Support filter(*args) Nov 18, 2020
@clokep clokep self-requested a review November 18, 2020 15:19
@clokep clokep merged commit 6f2606c into clokep:main Nov 26, 2020
@clokep
Copy link
Owner

clokep commented Nov 26, 2020

Looks great! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants