How do I get Django to delete files when I remove a model object when using Django 1.9?
<p>I am trying to get Django version 1.9 to delete the file corresponding to a FileField in my model when I remove the model. My first try was based on the <a href="https://stackoverflow.com/a/14310174/214742">delete signals as explained in another answer</a> but that does not seem to work from Django 1.8 and onwards. Another answer pointed me in the direction of <a href="https://github.com/un1t/django-cleanup" rel="nofollow noreferrer">Django-cleanup</a> but it does not work for me either (could it be that it uses the same approach internally?). I have also tried the <a href="https://stackoverflow.com/a/33081018/214742">post delete signal approach explained here</a> but the method never triggered. So what is the new way of doing this, any approach that deletes the file when deleting the model is fine to me.</p>