Django cascade delete and post_delete signal
问题 In my application post_delete signals being recorded in a specific model and when it was removed. class A(models.Model): ... class B(models.Model): a = models.ForeignKey('A') class C(models.Model): b = models.ForeignKey('B') def log_delete(sender, instance, **kwargs): logging post_delete.connect(log_delete, sender = A) post_delete.connect(log_delete, sender = C) When you delete an instance of A cascade delete occurs removing B and C instances. How can I disable signal for child instances on