Hi,
When I update a register that has a ImageField, the old file is not
deleted from the disk, so I have created a custom save method like
this:
def save( self ):
path = self.get_foto_filename()
delete_file(path)
super(Perfil, self).save()
But path is set to the new file I'm uploading instead the oldone, so I
can't access the old file to delete it.
Is this a bug or it works like this? How can I solve this problem? I
thought even creating a custom procedure in the database (postgre) but
I have never done it before, and I prefer to have all the code in the
django application.
Thank you very much.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---