Hi,
I am having trouble to understand the thumbnail example.
My case is that I have a class CV which has a file attribute - type : FileField.this file is stored in S3
Now I would like to send signal pre_delete to the model before its instance is going to be deleted.
My issue is that I don't know how to import the CV model into the function.
What i have tried.
from django_cleanup.signals import cleanup_pre_delete, cleanup_post_delete
Hi, I am having trouble to understand the thumbnail example. My case is that I have a class CV which has a file attribute - type : FileField.this file is stored in S3
Now I would like to send signal pre_delete to the model before its instance is going to be deleted. My issue is that I don't know how to import the CV model into the function. What i have tried. from django_cleanup.signals import cleanup_pre_delete, cleanup_post_delete
def CV(models.Model): ... file = models.FileFiles(path)
def cv_file_delete(**kwargs): from CV import delete // this is raising error delete(CV.file) cleanup_pre_delete.connect(cv_file_delete)