Opened 13 years ago

Closed 13 years ago

Last modified 9 years ago

#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
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


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/ 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)

django_1342.diff (2.0 KB) - added by Christopher Lenz <cmlenz@…> 13 years ago.
Allow specifying the admin “results per page” per model

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by Christopher Lenz <cmlenz@…>

Attachment: django_1342.diff added

Allow specifying the admin “results per page” per model

comment:1 Changed 13 years ago by Christopher Lenz <cmlenz@…>

Cc: cleonello@… added; cleonello@… 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 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2629]) magic-removal: Fixed #1342 -- Added list_per_page option to Admin options. Thanks, Christopher Lenz

comment:3 Changed 9 years ago by Antti Kaihola

Note: [2629] doesn't allow customizing MAX_SHOW_ALL_ALLOWED which was included in the original description as well. As of r12734 it's still not customizable.

Note: See TracTickets for help on using tickets.
Back to Top