Skip to content

Commit

Permalink
docs: add docstring for the paginator property override
Browse files Browse the repository at this point in the history
  • Loading branch information
GlugovGrGlib committed Nov 20, 2023
1 parent ee4b92c commit 95fcb12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lms/djangoapps/mobile_api/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ def list(self, request, *args, **kwargs):
# pylint: disable=attribute-defined-outside-init
@property
def paginator(self):
"""
Overrides API View paginator property to dynamically determine pagination class
based on the provided api_version. Implements solutions from the discussion at
https://www.github.com/encode/django-rest-framework/issues/6397.
"""
super().paginator # pylint: disable=expression-not-assigned
api_version = self.kwargs.get('api_version')

Expand Down

0 comments on commit 95fcb12

Please sign in to comment.