mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 04:54:00 +03:00
Merge pull request #5976 from victormpa/fix_filter_docs
Added import statement on filtering docs
This commit is contained in:
commit
4340ff42de
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user