📜  django 查询集唯一值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:16.436000             🧑  作者: Mango

代码示例2
class Getdata(models.Model):
    title = models.CharField(max_length=255)
    state = models.CharField(max_length=2, choices=STATE, default="0")
    name = models.ForeignKey(School)
    created_by = models.ForeignKey(profile)
    class Meta:
        unique_together = ["title", "state", "name"]