Difference Between 2 Ways of Searching in JSONField #1417
Unanswered
frozen-yogurt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello based on past issues. I found two ways of searching for JSONField(django.contrib.postgres.fields).
The first way is to override FILTER_DEFAULTS. The second way is to simply use filters.CharFilter to do the search work.
If I have a model:
Here is an example of overriding FILTER_DEFAULTS:
Here is an example of just using filters.CharFilter:
So based on above two methods, I have two questions:
Thank you
Beta Was this translation helpful? Give feedback.
All reactions