Hi,
here is the essence:
from django.contrib.admin.util NestedObjects
collector = NestedObjects(using=None)
collector.collect(User.objects.all())
to_delete = collector.nested()
It gives you a raw list of all the objects. For more friendly output
see the usage of NestedObjects.nested with the call
In the django admin site, it lists the entries that will be deleted
via cascade if you want to delete something. I'm wondering if you can
do something similar in the shell to identify the rows affected by a
deletion.
Is there such a function in django to show the list of casade deletes
like in the
2 matches
Mail list logo