Open
Description
class MyModel(models.Model):
region = IntegerRangeField
class MyModelFilter(filters.FilterSet):
class Meta:
model = MyModel
fields = "__all__"
filter_overrides = {
IntegerRangeField: {"filter_class": filters.NumericRangeFilter}
}
MyModelFilter({"region_min": 50, "region_max": 100}, queryset=MyModel.objects.all()).qs
This works with django_filters as filters
but not with rest_framework_filters as filters
. The latter does not filter the queryset.
Metadata
Metadata
Assignees
Labels
No labels