Skip to content

Commit

Permalink
Add DJANGOCMS_LINK_PAGINATE_BY setting
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 30, 2024
1 parent 6e5ef6f commit b656183
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ smaller the average result set size. The default is 0::
# Require at least 2 characters to be typed before searching for pages
DJANGOCMS_LINK_MINIMUM_INPUT_LENGTH = 2

By default django CMS Link will paginate the search results. You can change the
page size by setting the ``DJANGOCMS_LINK_PAGINATE_BY`` setting.
The default is 100::

# Show 5 results per page
DJANGOCMS_LINK_PAGINATE_BY = 100

Note, that in the admin paginated search results repeat the modle verbose name.


Non-standard hostnames
......................

Expand Down
2 changes: 1 addition & 1 deletion djangocms_link/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class GrouperModelAdmin:
class AdminUrlsView(BaseListView):
"""Handle AutocompleteWidget's AJAX requests for data."""

paginate_by = 20
paginate_by = getattr(settings, "DJANGOCMS_LINK_PAGINATE_BY", 100)
admin_site = None

def get(self, request, *args, **kwargs):
Expand Down

0 comments on commit b656183

Please sign in to comment.