Opened 19 years ago

Closed 19 years ago

Last modified 15 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
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)

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

Download all attachments as: .zip

Change History (4)

by Christopher Lenz <cmlenz@…>, 19 years ago

Attachment: django_1342.diff added

Allow specifying the admin “results per page” per model

comment:1 by Christopher Lenz <cmlenz@…>, 19 years ago

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 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

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

comment:3 by Antti Kaihola, 15 years ago

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