title: Django delete FileField
body: <p>I'm building a web app in Django. I have a model that uploads a file, but I can not delete the file. Here is my code:</p>
  <pre><code>class Song(models.Model):
      name = models.CharField(blank=True, max_length=100)
      author = models.ForeignKey(User, to_field='id', related_name=&quot;id_user2&quot;)
      song = models.FileField(upload_to='/songs/')
      image = models.ImageField(upload_to='/pictures/', blank=True)
      date_upload = models.DateField(auto_now_add=True)
  
      def delete(self, *args, **kwargs):
          # You have to prepare what you need before delete the model
          storage, path = self.song.storage, self.song.path
          # Delete the model before the file
          super(Song, self).delete(*args, **kwargs)
          # Delete the file after the model
          storage.delete(path)
  </code></pre>
  <p>Then, in <code>python manage.py shell</code> I do this:</p>
  <pre><code>song = Song.objects.get(pk=1)
  song.delete()
  </code></pre>
  <p>It deletes the record from the database but not the file on server.
  What else can I try?</p>
  <p>Thanks!</p>