How to change the default 3 instances showing in a InlineModelAdmin object in Django
When you define a InlineModelAdmin
class in Django, by default it shows 3 models in the admin page of the model that has a Foreign Key to the model I defined in the class.
How can I change that?
I 开发者_如何学编程just don't want to use max_num
field, because when using it, I won't be able to add another instances in the page.
Thanks
Instead of max_num
use extra
: http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.extra
精彩评论