title: Python Django does not overwrite newly uploaded file with old one
body: <p>I want to overwrite/replace a file whenever a new file is uploaded. Currently the app can upload the file to a specific folder but its not overwriting files in an event that a new file has been uploaded. I need assistance to resolve that.</p>
  
  <p>views.py</p>
  
  <pre><code>def uploadfunc(request):
      if request.method=='POST':
          form =uploadfileform(request.POST,request.FILES)
          if form.is_valid():
              form.save()
              return render_to_response('upload_successful.html')
      else:
          form=uploadfileform()
      return render(request, 'upload.html',{'form':form})
  </code></pre>
  
  <p>models.py</p>
  
  <pre><code>class uploadfolder(models.Model):
      """ my application """
      File_to_upload = models.FileField(upload_to='')
  </code></pre>
  
  <p>forms.py</p>
  
  <pre><code>class uploadfileform(forms.ModelForm):
      class Meta:
          model=uploadfolder
          fields=('File_to_upload',)
  </code></pre>