-
-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
I tried to update the example application to include global search support for the YADCF column filters.
i.e. in example/album/views.py:
class YADCFModelMultipleChoiceFilter(GlobalFilter, filters.ModelMultipleChoiceFilter):
field_class = YADCFModelMultipleChoiceField
class GlobalCharFilter(GlobalFilter, filters.CharFilter):
pass
class GlobalNumberFilter(GlobalFilter, filters.NumberFilter):
pass
class AlbumFilter(DatatablesFilterSet):
artist_name = YADCFModelMultipleChoiceFilter(
field_name="artist__name", queryset=Artist.objects.all(), lookup_expr="contains"
)
rank = GlobalNumberFilter()
name = GlobalCharFilter()
class Meta:
model = Album
fields = ("artist_name", )
However, the inclusion of GlobalFilter
in YADCFModelMultipleChoiceFilter
causes the example application to crash.
To reproduce, include the code above (example/albums/views.py), and enter a value into the multi select filter
This will cause the application to crash with:
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
I suspect that this might be due to the lack of regexp support in sqlite by default.
morenoh149
Metadata
Metadata
Assignees
Labels
No labels