Hello,
I have a function 'thesignal' that deletes the Photo record from a db
table.  However, after that is done the photo's still appear on the
file system.  How do i delete these photos?  Here is what I have so
far:

///////////////

models.py

class Photo(models.Model):
    photo = models.ImageField(upload_to="site_media/thumbnails/")
    thumbnail = models.ImageField(upload_to="site_media/thumbnails/",
editable=False)
    thumbnail2 = models.ImageField(upload_to="site_media/thumbnails/",
editable=False)

/////////////////

sig.py

def thesignal(sender, instance, signal, *args, **kwargs):
    from mysite.plush.models import Photo
    a = Photo.objects.get(id=instance.image.id)
    a.delete()

////

I assume I need to add some code to my 'thesignal' function


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to