开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜