From 4dafbb1dc0ed66026d51fe8c9ceda93d2efbc4e7 Mon Sep 17 00:00:00 2001 From: Marc Brevoort Date: Thu, 2 May 2019 13:36:11 +0100 Subject: [PATCH] Incorrect property name makes example not work Under heading `Overriding the initial queryset` the filter class is overridden which is documented as done by setting `filterset_class`. However under django_filters/rest_framework/backends.py in class `DjangoFilterBackend`, the method `get_filter_class` will use attribute `filter_class` instead. As a result, when trusting the documentation no filtering will take place at all. --- docs/api-guide/filtering.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md index 8a500f386..19fead09d 100644 --- a/docs/api-guide/filtering.md +++ b/docs/api-guide/filtering.md @@ -127,7 +127,7 @@ Note that you can use both an overridden `.get_queryset()` and generic filtering """ model = Product serializer_class = ProductSerializer - filterset_class = ProductFilter + filter_class = ProductFilter def get_queryset(self): user = self.request.user