Monday, February 28, 2011

Re: limit number of rows in change_list

On Feb 28, 1:55 pm, bigfudge <> wrote:
> How do I limit the number of rows displayed by default in a
> change_list?
> Many thanks,

In the file, under the class whose number of rows you want to
display - use "list_per_page"

class MyModelAdmin(admin.ModelAdmin):
list_per_page = 10

There is no "global" default that I have been able to find. I simply
set a constant in the file (say DEFAULT_ROWS = 12) and then
in each class I use:
list_per_page = DEFAULT_ROWS


You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment