Closed
Description
Currently, when using custom filtersets to add additional arguments to a query there does not seem to be any way to change the automatic description. Instead, the description is always "Filter" for any arguments.
It would be good to offer a way to change this, ideally by picking up on the label
argument of the Django filter, like this:
class OutcodeFilter(django_filters.FilterSet):
class Meta:
model = Outcode
order_by = ('code', )
max_time = django_filters.NumberFilter(method='filter_max_time', label="The maximum time")
def filter_max_time(self, queryset, name, value):
return queryset.max_time(value)
Metadata
Metadata
Assignees
Labels
No labels