Hi,
I have this class (representing real files on a filesystem):
class File(models.Model):
content = models.ForeignKey('Content', related_name='files')
filetype = models.ForeignKey('FileType')
filename = models.CharField(max_length=64,
verbose_name='filename')
I added a custom delete() function which physically deletes the file
when I delete the object.
I works perfectly well BUT when I call the delete() function of a
Content object (File has a ForeignKey on it), it also deletes the
according File objects (good), but do not delete the files themselves
(no good).
Is my only solution to add a custom delete() function to Content, in
order to explicitly call the File objects delete() function ??
Thank you !
--
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.