wagtailmodelchooser
wagtailmodelchooser copied to clipboard
Advanced Pagination needed.>!
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 ( https://github.com/neon-jungle/wagtailmodelchooser/blob/53144dd07838195085279e8a81d3651276c640f4/wagtailmodelchooser/views.py#L70 )
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
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