标签: django constraints manytomanyfield
我有
class MyModel: relations = models.ManyToManyField('MyModel', related_name = 'relations_reverse')
我想添加将强制实施的constraint 两端不能相同object。 (即myVar1 - myVar2 can be related but not myVar1 - myVar1)
constraint
object
myVar1 - myVar2 can be related but not myVar1 - myVar1