On Oct 19, 9:42 am, David De La Harpe Golden <david.delaharpe.gol...@ichec.ie> wrote: > > So to get deletion behaviour you want, you need to define a reverse > generic relation back to comment on your model for django's deletion > cascade to follow the deletion in the generic case. On your own models, > this is of course straightforward, but you may be stuck patching if > you're commenting on models in third party apps. > > http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#revers... > > """ > `comments = generic.GenericRelation(Comment, object_id_field="object_pk")` >
Thanks David, but I'm not sure I'm getting this. I've added that line to the class, but it doesn't give me cascade delete behavior (I can still delete a row and the comments linked to it remain in the db). Is there something else I need to do? Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.