just remember that a form instance is completely unaware of the model. So in your view you'll want to create a form instance for your list and a form instance for a list item (you can either work on the form instances now in the view to provide unique names for each input or in the template later). In the template you display your forms just like you would otherwise.
<form action="" method="post"> {{ list_form.as_ul }} {{ item1_form.as_ul }} {{ item2_form.as_ul }} or perhaps more efficients {{ for item in item_forms }} {{ item.as_ul}} {{ end for}} as I mentioned before you could also write out each form by hand in the template to ensure each input had unique names. ~ Anders On 5/13/07, Brad Fults <[EMAIL PROTECTED]> wrote: > > I'm in a situation where I have a List model class and a ListItem > model class. The ListItem class has a ForeignKey to the List class > with `edit_inline=models.STACKED, num_in_admin=10`. In the admin > interface for adding a new List, this is represented perfectly: it > shows the fields for the List object and 10 sets of fields for the > ListItem objects. > > How would I replicate this same form setup (1 List, 10 ListIems) using > newforms in my app? I looked at the admin code on the newforms-admin > branch, but it's very genericised and dense. I'm thinking there's a > simple way to accomplish this, but it's not jumping out at me after > reading the docs. > > I'd appreciate some pointers in the right direction. > > Thanks in advance. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---