Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document correct method usage for get_paginated_response #2890

Merged
merged 2 commits into from
May 5, 2015
Merged

Document correct method usage for get_paginated_response #2890

merged 2 commits into from
May 5, 2015

Conversation

radyz
Copy link
Contributor

@radyz radyz commented Apr 30, 2015

This fixes the reference to get_paginated_response for 3.x docs

From issue #2797

of old get_pagination_serializer only valid in 2.x
@@ -137,7 +137,7 @@ For example:
def recent_users(self, request):
recent_users = User.objects.all().order('-last_login')
page = self.paginate_queryset(recent_users)
serializer = self.get_pagination_serializer(page)
serializer = self.get_paginated_response(page)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't correct. This method will return the response object itself, not a serializer.

…and example using it with @list_route decorator in viewsets.
@radyz
Copy link
Contributor Author

radyz commented May 3, 2015

Sorry about the first PR, I think I've fixed the description of the method and the example where it's being used.

tomchristie added a commit that referenced this pull request May 5, 2015
…nse-method

Document correct method usage for get_paginated_response
@tomchristie tomchristie merged commit 2e85b4e into encode:master May 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants