I don't think you want a form set, but rather a modelform.
Look at the top (not the bottom!) of the page
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/

On Mon, Dec 27, 2010 at 12:06 AM, Burhan <burhan.kha...@gmail.com> wrote:
> Thanks, but I'm not sure which models to pass to it, when it asks for two
> models in this:
> "
>
> If you want to create a formset that allows you to edit books belonging to a
> particular author, you could do this:
>
>>>> from django.forms.models import inlineformset_factory
>>>> BookFormSet = inlineformset_factory(Author, Book)
>>>> author = Author.objects.get(name=u'Mike Royko')
>>>> formset = BookFormSet(instance=author)
>
> "
> So in my case, I have LineItem, which is what I need the user to fill in. So
> that would the inlineform, since I need more than one of those in my view,
> but what do I use for formset?
> In this line: inlineformset_factory(Author, Book)
> Not sure how to translate that to my models.
> Thanks again.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to