title: Django - form_valid() vs save()
body: <p>In django forms, for saving other data I usually use <code>form_valid()</code> but as I can also use <code>save()</code> method of formclass. </p>
  
  <p>Today I overrided <code>save()</code> instead of <code>form_valid()</code> and I got problem with my manytomanyfield. </p>
  
  <p>When using , the values of manytomanyfield are not saved but when I use <code>form_valid()</code> they start saving. Can anybody tell me the reason and what are the differences between both, which is the most convenient method and in what situation?</p>
  
  <p>Here is my overriding of save() method:</p>
  
  <pre><code>class ProductCreateForm(forms.ModelForm):
      sizes = make_ajax_field(ProductCreateModel,'sizes','sizes')
      colours = make_ajax_field(ProductCreateModel,'colours','colours')
  
      class Meta:
          model = ProductCreateModel
  
          fields = ('title','category',
                      'regions',)
  
      def __init__(self,*args,**kwargs):
          self.request = kwargs.pop("request")
          super(ProductCreateForm, self).__init__(*args, **kwargs)
  
      def save(self):
          product = super(ProductCreateForm, self).save(commit=False)
          user =  self.request.user
  
          product.location = user.user_location
          product.save()
          return product
  </code></pre>
  
  <p>When I override form_valid() method:</p>
  
  <pre><code>   def get_form_kwargs(self):
         kwargs = super(ProductCreateView,self).get_form_kwargs()
         kwargs.update({'request':self.request})
         return kwargs
  
     def form_valid(self, form):
         product = form.save(commit=False)
         user =  self.request.user
         form.instance.user = user
         form.instance.location = user.user_location
         form.save()
         return super(ProductCreateView, self).form_valid(form)
  </code></pre>
  
  <p><code>sizes</code>,<code>colours</code> and <code>regions</code> are m2m fields, as I mentioned when I overrides <code>save()</code> values of m2m not get saved but when I overrides <code>form_valid</code> they start saving.</p>