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

Effectively removing pagination for changelist view. #122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marktsavage
Copy link
Contributor

@marktsavage marktsavage commented Mar 25, 2022

Disabled the pagination in MenuItem changelist view by setting the list_per_page to max value. This was desired to allow the full result set to display on one page.

Copy link
Member

@Aiky30 Aiky30 left a comment

Choose a reason for hiding this comment

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

Needs a changelog entry and a brief description in the PR description.

@@ -56,6 +57,9 @@
using_version_lock = False
LOCK_MESSAGE = _("You don't have permission to change this item")

# This setting is used to effectively disable django pagination for MenuItem changelist view:
MAX_RESULTS_PER_PAGE = getattr(settings, "MAX_RESULTS_PER_PAGE", sys.maxsize)
Copy link
Member

Choose a reason for hiding this comment

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

@marktsavage The settings need to be in a separate file: conf.py, this is consistent with the cms ecosystem.

https://github.com/django-cms/djangocms-moderation/blob/6134c1f6857a466d2c6c30ca78b615f3dc2afab8/djangocms_moderation/conf.py#L20

The setting will also be prefixed with the package name, something like: CMS_NAVIGATION_TREE_MAX_RESULT_COUNT

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