Skip to content

Conversation

@j-riebe
Copy link

@j-riebe j-riebe commented Nov 25, 2025

The previous implementation performed two database queries to evaluate apage().
Now we make use of the pre-fetched element that is prepared in _apply_paginator_arguments
to check if there are additional pages without using acount().

Added tests for page() and apage() to verify only one database query is performed.
Tested against py3.13.2 / django 5.2.8

See #54 for full discussion.

The previous implementation performed two database queries to evaluate `apage()`.
Now we make use of the pre-fetched element from `_apply_paginator_arguments` to check if there are additional pages without using `acount()`.

Added tests for `page()` and `apage()` to verify only one database query is performed.
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.

1 participant