From 21c0fcf63b3cdd81c51c0f37c069ab895538c90d Mon Sep 17 00:00:00 2001 From: Victor Martins Date: Sun, 6 May 2018 00:02:09 -0300 Subject: [PATCH] Added import statement on filtering docs --- docs/api-guide/filtering.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md index 723b2fb35..e405535ba 100644 --- a/docs/api-guide/filtering.md +++ b/docs/api-guide/filtering.md @@ -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