Tag archives: notetoself

RSS feed of notetoself

It's often best to check what is going to be deleted with obj.delete() before actually running it, and the way to do it can be found, for example, here: https://stackoverflow.com/questions/12158714/how-to-show-related-items-using-deleteview-in-django

TL;DR:

from django.contrib.admin.utils import NestedObjects
collector = NestedObjects(using='default')
collector.collect([obj])
collector.nested()