num_in_admin equivalent in newforms

13 views
Skip to first unread message

Xiong Chiamiov

unread,
Nov 4, 2008, 12:57:17 PM11/4/08
to Django users
I'm in the process of converting a bunch of sites from pre-nfa to
1.0. One of the things I've run across is the change in inlines in
the admin interface. Previously, there was (http://
www.djangoproject.com/documentation/0.96/model-api/#many-to-one-relationships)
a parameter called num_in_admin that, when set to =1, would show all
filled models and one blank, allowing you to have the ability to add
as many of an object as you want without having a page filled with
blank models.

The current implementation, however doesn't seem to support this
(http://docs.djangoproject.com/en/dev/ref/contrib/admin/
#inlinemodeladmin-objects). Am I overlooking something obvious, or is
there another way to do this?

Daniel Roseman

unread,
Nov 4, 2008, 1:32:43 PM11/4/08
to Django users
On Nov 4, 5:57 pm, Xiong Chiamiov <xiong.chiam...@gmail.com> wrote:
> I'm in the process of converting a bunch of sites from pre-nfa to
> 1.0.  One of the things I've run across is the change in inlines in
> the admin interface.  Previously, there was (http://www.djangoproject.com/documentation/0.96/model-api/#many-to-one-relat...)
> a parameter called num_in_admin that, when set to =1, would show all
> filled models and one blank, allowing you to have the ability to add
> as many of an object as you want without having a page filled with
> blank models.
>
> The current implementation, however doesn't seem to support this
> (http://docs.djangoproject.com/en/dev/ref/contrib/admin/
> #inlinemodeladmin-objects).  Am I overlooking something obvious, or is
> there another way to do this?

Some combination of extra and max_num will do what you want.
--
DR.

Xiong Chiamiov

unread,
Nov 4, 2008, 1:54:41 PM11/4/08
to Django users
Actually, extra by itself does exactly what I want. For some reason I
couldn't see it - I guess I just got caught up in the specific name.
Thanks.

On Nov 4, 10:32 am, Daniel Roseman <roseman.dan...@googlemail.com>
wrote:
> On Nov 4, 5:57 pm, Xiong Chiamiov <xiong.chiam...@gmail.com> wrote:
>
> > I'm in the process of converting a bunch of sites from pre-nfa to
> > 1.0.  One of the things I've run across is the change in inlines in
> > the admin interface.  Previously, there was (http://www.djangoproject.com/documentation/0.96/model-api/#many-to-on......)
Reply all
Reply to author
Forward
0 new messages