3👍
Ran into your problem just now. Maybe you have found a solution since it’s been 5 years already. But if not, you can use formset factory for the model Item
and the usual model form for the model Sale
. This helps you create multiple instances of Item by rendering n number times your Item model in a form.
You can check this link https://medium.com/all-about-django/adding-forms-dynamically-to-a-django-formset-375f1090c2b0. It provides good example of how to use formset factory.
Source:stackexchange.com