On Thu, Feb 26, 2015 at 2:13 AM, Rodrigo Zayit wrote:
> Hi Karim,
> []
>
>
Thank you!
--
Karim N. Gorjux
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
Hi Karim,
You can do:
from django.db.models.signals import pre_delete
from django.dispatch.dispatcher import receiver
@receiver(pre_delete, sender=ModelName)
def modelname_delete(sender, instance, **kwargs):
instance.field_name.delete(False)
or on your model you can write your delete method
I'm using a form that get an image and store it in the database. Doing my
(manual) tests I discover that the deleting the FileField doesn't remove
the associated file on the hard disk. Is there a design pattern to handle
the remaining file?
Thank you.
--
Karim N. Gorjux
--
You received this me
3 matches
Mail list logo