title: Django multiple forms on one page with inherited models
body: <p>For my current Django project I have built a page that uses 3 ModelForms. </p>
  
  <p>The entire page is supposed to let hotels register on the site. 
  So the first ModelForm is from the Hotel model</p>
  
  <p>Next I want the user to enter 2 forms for images, a main image and a background image. These 2 models are inherited from a basic Image class.<br>
  So in this case both images will use the title field, coming from the base class. </p>
  
  <p>Now When I enter a new hotel into the form and also add the 2 images, both images get the same title.<br>
  When I take a look at the html code this does makes sense because the input fields both have the same name="title". </p>
  
  <p>For the rest the form works just as expected, it is just this one issue.<br>
  Of course I could just take the title field and put them into the child classes as child_class_1_title and child_class_2_title, but that would just break the entire OOP and DRY principle. </p>
  
  <p>How can I make sure that each form pushes the right data into the database?
  Thanks a lot in advance.</p>
  
  <p>This is my code for the forms:</p>
  
  <pre><code>class HotelForm(ModelForm):
      class Meta:
          model = Hotel
          fields = ('name', 'address', 'zip_code', 'city', 'website', 'email', 'phone', 'description', 'short_description', 'number_of_rooms', 'facilities',
                    'activities', 'environment', 'hotel_type')
          widgets = {
              'facilities': CheckboxSelectMultiple()
          }
  
  class HotelGeneralImageForm(ModelForm):
      class Meta:
          model = HotelGeneralImage
          fields = ('title', 'hotel_general_image')
          widgets = {
              'hotel_general_image': FileWidget()
          }
  
  class HotelBackgroundImageForm(ModelForm):
      class Meta:
          model = HotelBackgroundImage
          fields = ('title', 'hotel_background_image')
          widgets = {
              'hotel_background_image': FileWidget()
          }
  </code></pre>
  
  <p>And the view:</p>
  
  <pre><code>@csrf_exempt
  def hotel_registration(request):
      if request.method == 'POST':
          hotel_form = HotelForm(request.POST, instance=Hotel())
          hotel_general_image_form = HotelGeneralImageForm(request.POST, instance=HotelGeneralImage())
          hotel_background_image_form = HotelBackgroundImageForm(request.POST, instance=HotelBackgroundImage())
          if hotel_form.is_valid() and hotel_general_image_form.is_valid() and hotel_background_image_form.is_valid():
              new_hotel = hotel_form.save()
              new_hotel_general_image = hotel_general_image_form.save(commit=False)
              new_hotel_general_image.hotel = new_hotel
              new_hotel_general_image.save()
              new_hotel_background_image = hotel_background_image_form.save(commit=False)
              new_hotel_background_image.hotel = new_hotel
              new_hotel_background_image.save()
              return HttpResponseRedirect('registered')
      else:
          hotel_form = HotelForm(instance=Hotel())
          hotel_general_image_form = HotelGeneralImageForm(instance=HotelGeneralImage())
          hotel_background_image_form = HotelBackgroundImageForm(instance=HotelBackgroundImage())
  
      context = {'hotel_form': hotel_form,
                 'hotel_general_image_form': hotel_general_image_form,
                 'hotel_background_image_form': hotel_background_image_form
                 }
      context.update(csrf(request))
  
      return render_to_response('hotel/hotel-registration-form.html', context)
  </code></pre>