-
Notifications
You must be signed in to change notification settings - Fork 766
-
The original is here
If you know the way how to do that please share
Beta Was this translation helpful? Give feedback.
All reactions
Relevant django-filter issues: carltongibson/django-filter#583 carltongibson/django-filter#426
You can do this by manually defining your own filter, example from the first issue:
MarkaMoto = django_filters.CharFilter(name='attributes', lookup_expr='MarkaMoto__value__contains')
But there are limitations like not supporting icontains
or querying arrays.
Replies: 2 comments 1 reply
-
Relevant django-filter issues: carltongibson/django-filter#583 carltongibson/django-filter#426
You can do this by manually defining your own filter, example from the first issue:
MarkaMoto = django_filters.CharFilter(name='attributes', lookup_expr='MarkaMoto__value__contains')
But there are limitations like not supporting icontains
or querying arrays.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you very much @zbyte64 I though graphene-django
has feature to do a generic filter for this problem since it has been around for a year already.
Beta Was this translation helpful? Give feedback.
All reactions
-
We aren't allowed to have a graphql endpoint with arbitrary keys. For generic filtering, one would have to represent arbitrary key value pairs as it's own input type. The problem looks fairly similar to generic filtering of models across arbitrary columns and has the same concerns.
Beta Was this translation helpful? Give feedback.