akvo.scripts.cleanup_images module
- akvo.scripts.cleanup_images.cleanup_images(queryset)[source]
Clean out the images file tree of old images. The method for cleaning out old images is as follows:
- for every object of the relevant model
- for each image field
save the image to a temp directory
remove all images in the “real” directory for the object for each image field
save the image back to the “real” dir