How to show related items using DeleteView in Django?
You can use the Collector class Django uses to determine what objects to delete in the cascade. Instantiate it and then call collect on it passing the objects you intend to delete. It expects a list or queryset, so if you only have one object, just put in inside a list: from django.db.models.deletion import Collector … Read more