I have some data that is similar to this:
position: "1B, 2B, 3B, SS"
I'd like to be able to run a query such as /players/?position=1B, however, this currently does not return anything because the items are separated by a comma.
Here is stripped down version of the views.py:
class CharInFilter(django_filters.BaseInFilter, django_filters.CharFilter):
pass
class PlayerProfileFilter(django_filters.FilterSet):
position = CharInFilter(field_name='display_position', lookup_expr='in')
Is there a way to filter the data in this way?