Example #1
0
 def handle(self, *args, **options):
     cleanMedia = CleanMedia()
     # Delete empty dirs in /media/
     cleanMedia.deleteEmptyDirsRecusive()
     self.stdout.write(self.style.SUCCESS('All empty dirs in /media/ has been cleaned'))
Example #2
0
def clean_empty_media_dirs(sender, instance, **kwargs):
    cleanMedia = CleanMedia()
    # Delete empty dirs in /media/
    cleanMedia.deleteEmptyDirsRecusive()
Example #3
0
def clean_empty_media_dirs(sender, instance, **kwargs):
    cleanMedia = CleanMedia()
    # Delete imagekit chache file
    cleanMedia.cleanImagekitCacheImage(instance.main_image_thumb)
    # Delete empty dirs in /media/
    cleanMedia.deleteEmptyDirsRecusive()