add compatibility with django-versatileimagefield
Zepmanbc opened this issue · 3 comments
Zepmanbc commented
Hello,
Is it possible to add compatibility with django-versatileimagefield?
I've done something like this in my project but that would be great if it was native in django-cleanup
from django.dispatch import receiver
from django_cleanup.signals import cleanup_pre_delete
from versatileimagefield.fields import VersatileImageFieldFile
@receiver(cleanup_pre_delete)
def delete_versatileimage_created_pictures(file, **kwargs):
if isinstance(file, VersatileImageFieldFile):
file.delete_all_created_images()
Thank you
vinnyrose commented
Based on the code sample you provided django-cleanup already supports your needs through the signals provided. This is the same level of compatibility we provide for sorl-thumbnail and easy-thumbnails.
Zepmanbc commented
Sorry, I thought there was specific code for supporting sorl-thumbnail and easy-thumbnails.
Thank you
github-actions commented
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.