#1342 closed enhancement (fixed)
Allow customization of MAX_SHOW_ALL_ALLOWED and DEFAULT_RESULTS_PER_PAGE in admin views
| Reported by: | Russell Keith-Magee | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | contrib.admin | Version: | magic-removal |
| Severity: | normal | Keywords: | MAX_SHOW_ALL_ALLOWED DEFAULT_RESULTS_PER_PAGE |
| Cc: | cleonello@… cmlenz@… | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Chris Leonello <cleonello@…> in this thread wondered:
Is there anyway to change the MAX_SHOW_ALL_ALLOWED and
DEFAULT_RESULTS_PER_PAGE variables short of editing the
contrib/admin/views/main.py file? Since these are parameters that
directly relate to presentation, it seems that they should be
controlled at a module level basis at least (or class level at best).
Attachments (1)
Change History (4)
by , 20 years ago
| Attachment: | django_1342.diff added |
|---|
comment:1 by , 20 years ago
| Cc: | added; removed |
|---|---|
| Version: | → magic-removal |
I've attached a small patch that lets you configure the “results per page” in the admin options of a model using the list_limit attribute.
For example:
class MyModel(models.Model): ... class Admin: list_display = ['name', 'description'], list_limit = 16
Setting this ticket to magic-removal because that's what the patch targets.
comment:2 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Allow specifying the admin “results per page” per model