carltongibson / django-filter

A generic system for filtering Django QuerySets based on user selections
https://django-filter.readthedocs.io/en/main/
Other
4.48k stars 771 forks source link

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

Open tmc9031 opened 4 years ago

tmc9031 commented 4 years ago

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 commented 3 years ago

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:

https://github.com/carltongibson/django-filter/issues/1313

carltongibson commented 3 years ago

See also #1110.

carltongibson commented 3 months ago

Supposedly working example: https://github.com/carltongibson/django-filter/issues/1313#issuecomment-2293562219