Skip to content

thumbnail_cleanup command not work #164

Closed
saippuakauppias opened this Issue Aug 22, 2012 · 4 comments

3 participants

@saippuakauppias

May be necessary to replace all of the code to:

import os
from easy_thumbnails.models import Thumbnail
from django.conf import settings

mr = settings.MEDIA_ROOT  # or thumbnail media root?
for thumbnail in Thumbnail.objects.all():
    thumbnail_path = os.path.join(mr, thumbnail.name)
    if os.path.exists(thumbnail_path):
        os.remove(thumbnail_path)
        thumbnail.delete()

?

@camilonova

+1

Im using a remote storage, and should be great if this remove the images from the remote storage as well

@SmileyChris
Owner

This is one of those left-over commands from way back in the day. It would be nice to have it updated and working correctly with remote storage (and actually making sure it works in the first place).

It isn't something I want to tackle, but if someone else does, be my guest :)

@SmileyChris
Owner

Done in 7a03e7d

@camilonova

@SmileyChris Thanks, I'm glad to see you back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.