How do I add a database constraint in a Many-to-Many Relation

前端 未结 0 1128
礼貌的吻别
礼貌的吻别 2020-11-22 09:18

I have the following model:

class School(models.Model):
    principal = models.OneToOneField(User, on_delete=models.CASCADE)

The User

相关标签:
回答
  • 消灭零回复
提交回复
热议问题