Borislav is right, although it seems to me that overriding the model's save
method would be more appropriate in Your case.
On the other hand, You really should think twice before doing so. There's
actually a good reason for django orm not to delete the actual file after
the corresponding FileField
As far as I know, you should implement the file deletion by yourself. You
should code it on the Models delete function. preserving the default
behaviour.
here is a link to some read:
http://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods
How you do the file deletion is jus
Why old file is not deleted if I want to change it? I select new file in
form and it's saved but old file is not deleted. Is it my fault or Django is
designed not to delete it (if so, how to delete old file)?
--
You received this message because you are subscribed to the Google Groups
"Django
3 matches
Mail list logo