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

enhance django-filter.readthedocs.io for JSONField #1298

Open
tmc9031 opened this issue Nov 29, 2020 · 2 comments
Open

enhance django-filter.readthedocs.io for JSONField #1298

tmc9031 opened this issue Nov 29, 2020 · 2 comments

Comments

@tmc9031
Copy link

tmc9031 commented Nov 29, 2020

according to newest django-rest-framework SearchFilter support JSONField
whether django-filter could support JSONField ???
also add django-filter.readthedocs.io document context ???

https://www.django-rest-framework.org/community/3.12-announcement/
Nested searches against JSONField and HStoreField

https://www.django-rest-framework.org/api-guide/filtering/
For JSONField and HStoreField fields you can filter based on nested values within the data structure using the same double-underscore notation:

search_fields = ['data__breed', 'data__owner__other_pets__0__name']
@amirhoseinbidar
Copy link

it seems django-filter can support JSONField ( with some problems that i am not sure they related to django-filter or jsonfield )

you can read my issue and solution here:

#1313

@carltongibson
Copy link
Owner

See also #1110.

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

No branches or pull requests

3 participants