Detail lookup use in API filtering #8547
Unanswered
Liorinco
asked this question in
Ideas & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
As I lost some time searching why filtering on a
contains
lookup didn't do the job, until using anexact
lookup worked, I recommend to precise, in the expected documention (https://www.django-rest-framework.org/api-guide/filtering/), how to use the filtering with this kind of feature.I didn't undestand the query parameters must be used same as the query language, so I only expected one kind of filtering (
exact
,contains
...) applied on my query parameter, instead I could add__lookup
at the end of this one, to target the king oflookup
I needed, until I viewed a commentary on stackoverflow, talking about this syntax.Maybe this part of the documentation (https://www.django-rest-framework.org/api-guide/filtering/#filtering-and-object-lookups) talking about
lookups
may mention it in its content.Beta Was this translation helpful? Give feedback.
All reactions