Wednesday, December 31, 2014

FormSets with arbitary number of forms

I've been reading the documentation on FormSets and must admit that I am
a bit confused.

I have a model called Album that contains many Songs. But when a user
creates a new album I have no idea how many songs the Album will contain.

So I want to create a FormSet that has an Album form and many Song forms
but I need the user to be able to decide how many Song forms there are
in advance. Is this possible?

I might be misunderstanding the documentation but I couldn't see anything.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/54A447A2.4010804%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment