title: Django product update / inline formsets updating a model
body: <p>I am creating an E-commerce website,
  I'm having a problem when I'm updating images of the product, I can update the form `but I can't update the images.
  can you guys tell what am I doing wrong ?
  this is my code:</p>
  <p><strong>views.py</strong></p>
  <pre><code>class ProductEditView(UpdateView):
  model = Product
  form = ProductUpdateForm
  fields='__all__'
  product_metas  = ProductUpdateMetaForm
  template_name = 'products/update_product.html'
  product_meta_formset = ProductMetaInlineFormset() 
  meta = product_metas 
  ProductMetaInlineFormset  = inlineformset_factory(Product,Image,form = ProductUpdateMetaForm ,extra=5)
  
  
  def form_valid(self, form):
      response = super(ProductEditView, self).form_valid(form)
      if self.request.method == 'POST':
          product_meta_formset = self.ProductMetaInlineFormset(self.request.POST, self.request.FILES, instance=self.object)
          product_meta_formset.save()
      return response
      
  def get_context_data(self, **kwargs):
      context = super(ProductEditView, self).get_context_data(**kwargs)  
      context['product_meta_formset'] = self.ProductMetaInlineFormset(instance=self.object)
      return context    
      
  </code></pre>
  <p><strong>forms.py</strong></p>
  <pre><code>class ProductUpdateMetaForm(forms.ModelForm):
  class Meta:
      model = Image
      fields = ['image', 'is_feature', ]
      
  ProductMetaInlineFormset  = inlineformset_factory(Product,Image,form = ProductUpdateMetaForm ,extra=5,)
  </code></pre>
  <p><strong>update_product.html</strong></p>
  <pre><code>&lt;div class=&quot;container mt-4&quot;&gt;
  &lt;form  enctype=&quot;multipart/form-data&quot; action= &quot;.&quot; method=&quot;POST&quot; class=&quot;ui form&quot;&gt; 
      {% csrf_token %}
      &lt;div class=&quot;card&quot;&gt;
          &lt;div class=&quot;card-body&quot;&gt;
              {{ form.non_form_errors }}
              {{ form.as_p }}
         
              {{ product_meta_formset.non_form_errors }}
              {{ product_meta_formset.management_form}}
              {% for form in product_meta_formset %}
              &lt;div class=&quot;d-flex py-1 inline {{ product_meta_formset.prefix }}&quot;&gt;
              
                  &lt;div&gt;{{form.image.label}}: {{ form.image }}&lt;/div&gt;
                 
                  &lt;div class=&quot;ml-4&quot;&gt;{{form.is_feature.label}}: {{ form.is_feature }}&lt;/div&gt;
                  {% if product_meta_formset.can_delete %}
                      &lt;div class=&quot;ml-4&quot;&gt;{{ form.DELETE }} {{ form.DELETE.label }}&lt;/div&gt;
                  {% endif %}
              &lt;/div&gt;
              {% endfor %}
          &lt;/div&gt;
      &lt;/div&gt;
    
          &lt;button type='submit' class = 'ui positive button mtop'&gt;Update product&lt;/button&gt;    
          
             &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>