How to show more than 100 items on each paginated "Change List" page in Django Admin?
django, django-admin, django-pagination, pagination, python
Solution
See http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_per_page
In your ModelAdmin definition, set `list_per_page`:
class MyModelAdmin(admin.ModelAdmin):
list_per_page = 400
I believe you can also add the `all` GET parameter to your query (ie, add `?all` to the end of your url), but that only works if you have less than 200 items, and this limit is hardcoded in the admin. Therefore it's only useful if you have more than `list_per_page` (100) and less than 200 items, but the admin will offer you a link for this anyway when this is the case.
Problem
In one of the models overview panel, after I filter the items by month, I have to select them all and then create a document with information regarding them (kind of like a monthly report). This is a problem when one month has more than 100 items as Django paginates the filtering results. Is there a way to increase the number of items shown from 100 to 400 or select all the items from the filtering result? Selecting all the items from one page, creating a document, going to the next, creating another, etc, then merging the documents isn't an option.