hi i got a model in django admin working fine but it is listing all the object in only one page i would like to paginate then .. What do i need to add at my admin.py to get then paginate ... ?
heres my admin.py :
from cliente.models import Cliente
from django.contrib import admin
class ClienteAdmin(admin.ModelAdmin):
list_display = ('nome','bairro','endereco','telefone')
list_filter = ('bairro',)
ordering = ('nome',)
search_fields = ('endereco',)
pass
admin.site.register(Cliente,ClienteAdmin)
See ModelAdmin.list_per_page. The default is 100
, but you can set it to a lower value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With