I have a Django model that refers to itself as below:
parent = models.ForeignKey('self', ...)
I need to act in some situations as on_delete=models.CASCADE and in other situations as on_delete=models.DO_NOTHING.
How can I do that?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…