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.
This commit is contained in:
Marc Brevoort 2019-05-02 13:36:11 +01:00 committed by GitHub
parent 1e519486e1
commit 4dafbb1dc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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