title: Inline formset for creating new objects with one-to-many relationship?
body: <p><strong>models.py:</strong></p>
  
  <pre><code>class Item(models.Model):
      name = models.CharField(max_length=50)
  
  class ItemImage(models.Model):
      image = models.ImageField(upload_to='item_pics')
      item = models.ForeignKey(Item, related_name='images')
  </code></pre>
  
  <p>With the above defined models, <code>Item</code> has a one-to-many relationship to <code>ItemImage</code>. I am working on a django form that enables user to create a new <code>Item</code> instance, along with the choice of uploading up to two <code>ItemImage</code>. Note that the <code>Item</code> and the associating <code>ItemImage</code> objects need to be created at the same stage. </p>
  
  <p><strong>forms.py:</strong></p>
  
  <pre><code>class ItemForm(ModelForm):
      img_1 = fields.ImageField()
      img_2 = fields.ImageField()
  
      class Meta:
          model = Item
          fields = ('name', 'description', 'circles', 'location', 'rental_fee', 'rental_time_unit', 'deposit', 'rental_rules',)
  </code></pre>
  
  <p>On a second thought, instead of adding the image fields to <code>ItemForm</code>, I am guessing it might be a better approach to create a <code>ModelForm</code> for <code>ItemImage</code> and use <strong>inline formset</strong>. I have never used inline formset and thus my concept of it is still vague. I want to know if this is a right scenario to use inline formset. </p>