Multiple Models in a single django ModelForm?

You can just show both forms in the template inside of one <form> html element. Then just process the forms separately in the view. You’ll still be able to use form.save() and not have to process db loading and saving yourself.

In this case you shouldn’t need it, but if you’re going to be using forms with the same field names, look into the prefix kwarg for django forms. (I answered a question about it here).

Leave a Comment