You can set list_per_page to list the specific number of items on each paginated Change List page. By default, 100
is set to list_per_page
.
And, you can also set list_max_show_all to show or hide Show all link on each paginated Change List page. By default, 200
is set to list_max_show_all
. *Show all link appears if list_max_show_all
value is more than or equal to total items while Show all link disappears if list_max_show_all
value is less than total items.
For example, there is Person
model below:
# "models.py"
class Person(models.Model):
name = models.CharField(max_length=20)
def __str__(self):
return self.name
And, there is Person
admin below:
# "admin.py"
@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
pass
Then, all 7
persons are listed as shown below:

Now, I set list_per_page = 4
to Person
admin as shown below:
# "admin.py"
@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
list_per_page = 4 # Here
Then, 4
persons are listed on the 1st page as shown below:

And, 3
persons are listed on the 2nd page as shown below:

Next, I click on Show all link as shown below:

Then, all 7
persons are listed as shown below:

Next, I set list_max_show_all = 6
to Person
admin as shown below:
# "admin.py"
@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
list_per_page = 4
list_max_show_all = 6 # Here
Then, Show all link disappears as shown below because list_max_show_all
value 6
is less than the total persons 7
:
