[Answer]-In what situations are Django formsets used?

1👍

According to the documentation:

A formset is a layer of abstraction to working with multiple forms on the same page. It can be best compared to a data grid.

So any time you want to have multiple instances of a particular form displayed on a page for creation or updating. An example of this might be a Phonebook. Each Form is a single entry in the phonebook, but a Formset of Phonbook forms will allow you to create or edit multiple entries in one go.

0👍

One case is when ModelA have a foreign key to ModelB. you can say that one ModelB has many ModelA, so lets say that ModelB is a Invoice and ModelA is the ProductItem, one invoice has one or many product items.

In the practice now you can make a basic formset like that: http://help.mailchimp.com/img/addafieldoption.jpg where you can add more product items to a invoice.

Leave a comment