Added import statement on filtering docs

This commit is contained in:
Victor Martins 2018-05-06 00:02:09 -03:00
parent fd4282c7fa
commit 21c0fcf63b

View File

@ -187,6 +187,8 @@ When in use, the browsable API will include a `SearchFilter` control:
The `SearchFilter` class will only be applied if the view has a `search_fields` attribute set. The `search_fields` attribute should be a list of names of text type fields on the model, such as `CharField` or `TextField`.
from rest_framework import filters
class UserListView(generics.ListAPIView):
queryset = User.objects.all()
serializer_class = UserSerializer