Skip to content

Commit cc7cd52

Browse files
committed
Include more info in docstring
1 parent 064a028 commit cc7cd52

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

readthedocs/search/api.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ class SearchPagination(PageNumberPagination):
6060
max_page_size = 100
6161

6262
def paginate_queryset(self, queryset, request, view=None):
63-
"""Override to get the paginated result from the ES queryset."""
63+
"""
64+
Override to get the paginated result from the ES queryset.
65+
66+
This makes use of our custom paginator and slicing support from the ES DSL object,
67+
instead of the one used by django's ORM.
68+
69+
Mostly inspired by https://github.com/encode/django-rest-framework/blob/acbd9d8222e763c7f9c7dc2de23c430c702e06d4/rest_framework/pagination.py#L191 # noqa
70+
"""
6471
# Needed for other methods of this class.
6572
self.request = request
6673

0 commit comments

Comments
 (0)