Skip to content

Commit 4340ff4

Browse files
authored
Merge pull request #5976 from victormpa/fix_filter_docs
Added import statement on filtering docs
2 parents fd4282c + 21c0fcf commit 4340ff4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/api-guide/filtering.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ When in use, the browsable API will include a `SearchFilter` control:
187187

188188
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`.
189189

190+
from rest_framework import filters
191+
190192
class UserListView(generics.ListAPIView):
191193
queryset = User.objects.all()
192194
serializer_class = UserSerializer

0 commit comments

Comments
 (0)