-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Version 3.1 #1169
Comments
How might a cursor-based pagination implementation work in these upcoming improvements? Facebook SDK page has a good description: https://developers.facebook.com/docs/reference/api/pagination/ And here is a solution for Django nonrel: |
The pagination API should be able to support cursor style paginations as well as numbered paging, but we not actually provide those implementations. |
Please don't make implementers deal with trivial (and possibly non-trivial) features over and over again. If you are going to drop the numbered paging implementation that would be bad for the community and the project. |
There's no plan for that to happen. |
@tomchristie Sorry I misunderstood you then. What did you mean? |
I meant to say that we might not necessarily provide any extra On 3 November 2013 14:12, Omer Katz notifications@github.com wrote:
|
not saying it's a great idea, but as an immediate workaround if you need (or at least want) e.g. limit/offset (Of course people are moving to opaque cursor, limit/offset is just an example) note you can e.g. apply them directly as a bodged django-filter rather than a paginator as in e.g. https://gist.github.com/dgoldensquared/8668831#file-limoff-py This has an interesting (and conceivably useful) effect the existing oldschool pagination is then applied within the limited/offset results. |
I guess, not planned on DRF 2? >_> |
Improving the pagination API is still very much on the roadmap, yup! See the first stretch goal, here... https://www.kickstarter.com/projects/tomchristie/django-rest-framework-3 |
Note that this ticket should include addressing #1538 if necessary. |
We have implemented pagination support to use headers instead of modifying the output - https://github.com/opennode/nodeconductor/blob/develop/nodeconductor/core/mixins.py#L104 . @tomchristie, if you think it's of a value, I can formulate a more proper pull request. |
It's prob worth waiting for the pagination API before looking at a PR for an implementation, but yes that'd be great once we start pulling 3.1 together! |
Note: lots of progress on this currently in the 3.1 branch. |
Some possible remaining tweaks:
|
Is there a plan to implement also Headers-based pagination? |
There is an example in the docs (in the incoming version-3.1 branch) that shows how to do it. |
So yes, we'll be supporting it, but the built-in schemes won't use it directly - the |
so 3.1 is RC now? |
Released. |
Link to draft release announcement
Headline features include:
Required
Optional
Strip '=' on cursor based pagination.Ensure we handle None, True, False values on cursor based pagination.Consider further performance improvements based on benchmarking. (Esp improve the common case for attribute lookup on fields)- Dropped. To be considered for 3.2.Add example forserializer_field_mappings
(and consider allowing partial overrides.)Decide if- DroppedDurationField
should make the cut, given that we're headlining the 1.8 fields - if we've got this all mostly wrapped up then we could move it in.The text was updated successfully, but these errors were encountered: