if anyone is still interested in this topic here is some relevant information :
FilterSet
in attribute Meta.fields
.FilterSet
class we should declare it in the view using the filterset_class
attribute - the author of the post does not do that.DateFromToRangeFilter
field is provided automatically using the <field_name>_before
and <field_name>_after
lookup - so there is no reason to override this.Let me also add a comment on how to declare filters in the view:
search_fields
, and on the other hand you do exactly the same in your FilterSet
- why ? the sarch_field
attribute provides us with lookup logic icontains
by default - linkfilterset_fields
but you have created a custom object of type FilterSet
- we should use either one or the other.