title: How to save two forms in one model in Django?
body: <p>I have two Django forms of the same model in the same view, so when I try to save them I get two objects of the model and my goal is to get one single object with the data of both forms.</p>
  
  <p>I've tried to save both forms separately, which lead to creating two objects. Also, I've thought of saving one form and then updating the second one but I just don't know how to do that.</p>
  
  <pre><code>    if request.method == 'POST':
          animal_form_required = AddAnimalFormRequired(data=request.POST)
          animal_form_optional = AddAnimalFormOptional(data=request.POST)
          if animal_form_required.is_valid() and animal_form_optional.is_valid():
  
              animal_required = animal_form_required.save(commit=False)
              animal_required.save()
  
              animal_optional = animal_form_optional.save()
              animal_optional.save()
  
              return render(...)
  </code></pre>
  
  <p><code>animal_required</code> and <code>animal_optional</code> are the two forms and <code>animal</code> is the model. Both forms have different attributes of the animal. After doing this, I get two objets of <code>animal</code>: one with the <code>animal_required</code>attributes and one with the <code>animal_optional</code> attributes. How can I get one single object of <code>animal</code>with all the attributes?
  Thanks so much in advance!</p>