-
Notifications
You must be signed in to change notification settings - Fork 49
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
Do not require the count attribute to be present #136
Conversation
When using cursor pagination the count attribute is not included by default. http://www.django-rest-framework.org/api-guide/pagination/#cursorpagination
I misspoke. Before 1.0 I did have to override extractPageNumber in the serializer.
|
@kevinwmerritt Thanks for your PR and comments. Do you think there's a way to support both CursorPagination and PageNumberPagination without the implementations interfering too much? |
I think he's saying that both will work if the check for |
@dustinfarris correct. Removing the check for |
Ok, got it. Thanks. @kevinwmerritt Can you add a test to ensure the count check doesn't creep in again? One idea for this test is to test that |
@kevinwmerritt It would also be nice to get your |
@kevinwmerritt are you able to make the changes @benkonrath suggested? |
@dustinfarris Yes. I think I can get to it this week. I can close this PR for now. |
Did you mean to close this? |
Hi @kevinwmerritt. Any update here? |
Closing in favor of #143 |
When using cursor pagination the count attribute is not included by default.
http://www.django-rest-framework.org/api-guide/pagination/#cursorpagination
This one line change is required for cursor pagination to work. The count attribute was not required before 1.0.