django rest framework datatables does not paginate

Solutions on MaxInterview for django rest framework datatables does not paginate by the best coders in the world

showing results for - "django rest framework datatables does not paginate"
Louka
16 Apr 2018
1# filter your queryset here. 
2# than give it to self.queryset = your filtered queryset
3
4queryset = self.filter_queryset(self.queryset) # this to enable sorting and search capabilities
5
6# this to paginate whats left of filters
7page = self.paginate_queryset(queryset) 
8if page is not None:
9  serializer = self.get_serializer(page, many=True)
10  return self.get_paginated_response(serializer.data)
11
12serializer = self.get_serializer(queryset, many=True)
13return Response(serializer.data)
14#
15