Skip to content
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

Advanced Pagination needed.>! #40

Open
hazho opened this issue Apr 30, 2022 · 1 comment
Open

Advanced Pagination needed.>! #40

hazho opened this issue Apr 30, 2022 · 1 comment

Comments

@hazho
Copy link

hazho commented Apr 30, 2022

I have two proposals:
1 - a pagintate amount to be specified at the registery level, example: @register_model_chooser(per_page=30)
and pass that value to the (

paginator = Paginator(qs, per_page=10)
)

2- A paginate per site, imagin a multi-site project that has a model inherited from BaseSettings (which has site attribute), paginator in the proposal (1) could be affected by the filtering (in template filtering is tested by if statement, checking the requested site_id and the instance site_id in the modal), in a way that the actual shown number of instances are based on the id numbers of all instance in the DB.. but if you implement a paginate per_site as a boolean argument in the proposal (1), would probably solve this issue.

I am not aware of how to implement any of the two proposals above, but you may be able to properly implement both or at least first one

@seb-b
Copy link
Member

seb-b commented May 17, 2022

It's a nice idea, I'm not sure how useful it is? Open to a PR for the functionality, it could be a setting

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

No branches or pull requests

2 participants