Skip to content

Extracted page_size logic into get_page_number to allow overloading #6753

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

Closed
wants to merge 1 commit into from
Closed

Conversation

askoretskiy
Copy link

@askoretskiy askoretskiy commented Jun 21, 2019

Description

Allow to override the logic to get page_number in the same way as get_page_size.

Then one could create a class that simply overrides this method instead of copy-pasting whole paginate_queryset method.

Also provide view into get_page_size and get_page_number

Copy link
Member

@rpkilby rpkilby left a comment

Choose a reason for hiding this comment

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

Hi @askoretskiy. I'm tentatively a +1 on this, but am curious what use case this supports. Thanks.

@tomchristie
Copy link
Member

Okay on having seen this, have noticed that it's better take on #7652, although it conflicts since I'd already merged that. (Trucking through too much stuff)

@tomchristie
Copy link
Member

Resolved via c05cbe2

Thanks!

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.

3 participants