django-filter
django-filter copied to clipboard
enhance django-filter.readthedocs.io for JSONField
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']
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
See also #1110.
Supposedly working example: https://github.com/carltongibson/django-filter/issues/1313#issuecomment-2293562219