django-imagekit icon indicating copy to clipboard operation
django-imagekit copied to clipboard

--force flag for generateimages management command

Open ozren1983 opened this issue 7 years ago • 2 comments

Today I've ran into an issue where generated images accidentally got deleted from disk, but cache (memcached) still kept info that generated images were created, so generateimages management command didn't generate new images. I know I can clear cache in that case, but didn't feel like messing with memcached since we are using it to store some other data. I ended up overriding generateimages command and adding image_file.generate(force=True).

I think that adding --force flag to generateimages might be useful for such scenarios. It looks like a simple change where generateimages --force would call image_file.generate(force=True), otherwise it would call image_file.generate().

If you agree I'll submit a pull request.

ozren1983 avatar May 23 '18 22:05 ozren1983

Looks nice. I'm waiting for your PR.

vstoykov avatar May 24 '18 06:05 vstoykov

+1

ArtemBernatskyy avatar Aug 26 '18 19:08 ArtemBernatskyy