Skip to content

Help text for arguments #16

Closed
Closed
@morgante

Description

@morgante

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions