Skip to content
This repository

thumbnail_cleanup command not work #164

Closed
saippuakauppias opened this Issue · 4 comments

3 participants

Denis Veselov Camilo Nova Chris Beaven
Denis Veselov

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()

?

Camilo Nova

+1

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

Chris Beaven
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 :)

Chris Beaven
Owner

Done in 7a03e7d

Camilo Nova

@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.