mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Merge 70e6594b3c
into 190473f508
This commit is contained in:
commit
0848d5dcfd
|
@ -102,6 +102,16 @@ class MultipleObjectAPIView(MultipleObjectMixin, GenericAPIView):
|
|||
pass
|
||||
return self.paginate_by
|
||||
|
||||
def paginate_queryset(self, queryset, page_size):
|
||||
"""
|
||||
Paginate queryset object, if filtering enabled, not a filter object.
|
||||
"""
|
||||
|
||||
if self.filter_backend:
|
||||
queryset = queryset.qs
|
||||
|
||||
return super(MultipleObjectAPIView, self).paginate_queryset(queryset, page_size)
|
||||
|
||||
|
||||
class SingleObjectAPIView(SingleObjectMixin, GenericAPIView):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user