Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for page_size parameter in CursorPaginator class#5250

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@cypreess
Copy link
Contributor

@cypreesscypreess commentedJul 5, 2017
edited
Loading

CursorPaginator receives identical support for page size query parameter asPageNumberPagination.
Solving#5249

joshmaker reacted with thumbs up emojicalvin620707 reacted with heart emoji
@lovelydinosaur
Copy link
Contributor

Hiya! The code looks good, but I'm still in two minds about if we should accept extra behavior on the already-complex cursor pagination. Not sure how to best take a judgement on this right now.

@cypreess
Copy link
ContributorAuthor

cypreess commentedJul 10, 2017
edited
Loading

@tomchristie I actually don't understand where is that complexity you mention. In pagination you have two concepts:

  1. logic for finding page starting position - this can be anything, an offset, a cursor to value used for ordering, etc.
  2. logic for saying how many elements to retrieve from start position - here just a single integer param ofpage_size

The only doubt I have here is about the role ofoffset_cutoff in whole story.

@joshmaker
Copy link

I hope this can be merged in at some point, because we really like this feature at The Atlantic. Ignoring the extensive unit tests, it's only a little bit more code and makes theCursorPaginator API work more like the other built in paginators.

@carltongibson
Copy link
Collaborator

carltongibson commentedSep 25, 2017
edited
Loading

OK, let's have this.

I was going to say "Needs Docs" butCursorPagination is already documented as taking apage_size param... 🙃

Thanks for the effort@cypreess!

rpkilby reacted with thumbs up emoji

@carltongibsoncarltongibson merged commit60b9e58 intoencode:masterSep 25, 2017
carltongibson added a commit that referenced this pull requestSep 25, 2017
carltongibson added a commit that referenced this pull requestSep 26, 2017
carltongibson added a commit that referenced this pull requestSep 27, 2017
carltongibson added a commit that referenced this pull requestSep 28, 2017
carltongibson added a commit that referenced this pull requestOct 5, 2017
carltongibson added a commit that referenced this pull requestOct 5, 2017
carltongibson pushed a commit that referenced this pull requestOct 6, 2017
* Set version number for 3.7.0 release* Rename release notes sectionMoved issue links to top for easier access.(Can move back later)* Add release note for#5273* Add release note for#5440* Add release note for#5265Strict JSON handling* Add release note for#5250* Add release notes for#5170* Add release notes for#5443* Add release notes for#5448* Add release notes for#5452* Add release not for#5342* Add release notes for 5454* Add release notes for#5058 &#5457Remove Django 1.8 & 1.9 from README and setup.py* Release notes for merged 3.6.5 milestone ticketsTickets migrated to 3.7.0 milestone.* Add release notes for#5469* Add release notes from AM 2ndOct* Add final changes to the release notes.* Add date and milestone linkMove issue links back to bottom.* Update translations from transifex* Begin releae anouncement* Add release note for#5482* 3.7 release announcement & related docs.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@rpkilbyrpkilbyrpkilby approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.7.0 Release

Development

Successfully merging this pull request may close these issues.

5 participants

@cypreess@lovelydinosaur@joshmaker@carltongibson@rpkilby

[8]ページ先頭

©2009-2025 Movatter.jp