how can I set numbers of admin.Tabularline
in django admin
? in default, it shows 3 empty rows and i just want to show only 1 empty row.
class ClientPaymentOptionInline(admin.TabularInline):
model = ClientPaymentOption
fields = ('name', 'action','percent', 'fixamount', 'itemcharged', 'client')
class ClientAdmin(admin.ModelAdmin):
#display list
list_display = ('name','b_type','banner','logo',
'contact','address','account_type',
'status','currency','color','user',
)
#display fields
fields = ('name','b_type','banner','logo','contact',
'address','account_type','status',
'currency','color','user',
)
inlines = [ClientPaymentOptionInline]
admin.site.register(Client, ClientAdmin)
Set your inline's extra
attribute to 1.
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