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

The pagination isn't working for some API endpoints #909

Open
jefmoura opened this issue Dec 20, 2017 · 2 comments
Open

The pagination isn't working for some API endpoints #909

jefmoura opened this issue Dec 20, 2017 · 2 comments
Labels

Comments

@jefmoura
Copy link
Member

We have overwritten the list method but we aren't paginating the result in it, that's why the pagination isn't working for some endpoints.
The pagination is applied in the queryset and returned with the get_paginated_response, so if we overwrite the list method, we have to add the following logic to the functions:

    page = self.paginate_queryset(queryset)
        if page is not None:
            serializer = self.get_serializer(page, many=True)
            return self.get_paginated_response(serializer.data)
@karrla karrla added the bug label Feb 12, 2018
@rafa-munoz
Copy link
Contributor

@leonholub I found this in TolaActivity. Take a look if it's being finally solved

@jefmoura
Copy link
Member Author

@Menda It's solved only for the endpoint that was added the pagination. All the other endpoints that we have overwritten the pagination isn't working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants