And it's what puzzle me. That's my models :
class Image(models.Model): name = models.CharField(max_length=50) file = models.FileField(upload_to=PRODUCT_IMAGES) class ProductPage(Page): product_description = models.TextField() product_id = models.IntegerField() original_image = models.ImageField(upload_to=PRODUCT_IMAGES) category = models.ForeignKey(Category) similar_products = models.ManyToManyField('self', symmetrical=True, null=True, blank=True) images = models.ManyToManyField(Image, blank=True) videos = models.ManyToManyField(Video, blank=True) (it inherit from page, for menu management - no link to image) If a link an image in ProductPage and then delete the image later, the admin site will tell me that it would also delete the ProductPage. I tried it, and it got deleted. I'm using the svn version - uptodate On Jun 11, 11:29 am, Jashugan <jashu...@gmail.com> wrote: > On Jun 11, 8:08 am, Francis <lav.fran...@gmail.com> wrote: > > > Is it possible to disable recursive delete? > > > Because I have some pages models that has a m2m relationship with an > > image/video table. But if I delete an image, I don't want it to also > > delete the page. > > I don't think recursive delete is enabled in m2m relationships, just > in foreign key relationships. In m2m relationships, the only thing > that should be deleted is the records in the join table, but not in > the target or source tables. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---