FileField doesn't clean up directory after deletion
|Reported by:||Michiel_1981||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If a FileField file is being deleted it doesn't clean up a empty directory that might occur after deletion.
This is only a issue if you use a dynamic path based on date.
If this is the case then you could create a lot of empty directories and/or nested empty directories.
class MetaFile(models.Model): file = models.FileField(_("File"), max_length=255, upload_to='meta/%y/%m')