Skip to content

[Admin] Offer Keyset / Seek Pagination #31

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

Open
1 task done
VaZark opened this issue May 19, 2025 · 2 comments
Open
1 task done

[Admin] Offer Keyset / Seek Pagination #31

VaZark opened this issue May 19, 2025 · 2 comments

Comments

@VaZark
Copy link

VaZark commented May 19, 2025

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

Offer a KeysetPagination with just the next and previous buttons, and fetch the items count on ajax button click (or just hide it) for the admin list view

This also helps ensure that links shared to look up a table are far more precise, as data can change between pages on a fast-moving dataset. There are some tables that I look up via a DB tool like DBeaver due to incessant http timeouts.

Problem

When working with large datasets, the admin's standard LIMIT..OFFSET pagination becomes expensive, real fast. Simple page loads can take seconds if not minutes. Add in the default count on every list page, the two queries might be too much to handle.

Request or proposal

proposal

Additional Details

No response

Implementation Suggestions

Django already offers a custom pagination class. This would essentially be leveraging the same but as an officially supported lookup method.

Copy link

Thank you VaZark for sharing your idea! We have a lot of them so please be patient. You can see the current queue here.

Community instructions

For commenters, please use the emoji reactions on the issue to express support, and/or concern easily. Please use the comments to ask questions or contribute knowledge about the idea. It is unhelpful to post comments of "I'd love this" or "What's the state of this?"

Reaction Guide

  • 👍 This is something I would use
  • 👎 This is something that would cause problems for me or Django
  • 😕 I’m indifferent to this
  • 🎉 This is an easy win

@LilyAcorn
Copy link
Contributor

I've definitely run into the count issue before. I think having a more performant alternative readily available would be a win.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Idea
Development

No branches or pull requests

2 participants