I am a bit confused. I know that by using Formset we could generate multiple form. Aside from that , when should I use Formset or Modelform?
Asked
Active
Viewed 4,721 times
1 Answers
18
ModelForms are used to automatically create forms based on a single model instance.
If you don't have a model instance (and don't want to create one), but just want to handle arbitrary data, use a plain old form.
If you have lists of data that you need to get, whether as Models or data, FormSets are the answer.
FormSets are used to automatically manage lists of forms. You don't want to handle each form separately unless you need to. A FormSet can also use ModelForms, Yeah!

leech
- 8,293
- 7
- 62
- 78
-
Wooot! That is awesome to know! By the way, how could we put ModelForms in a FormSet? Didn't see it or found it yet so far :( – Haikal Nashuha Jan 20 '12 at 04:43