Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Django Models Unique Rows

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"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Python #Django #Models #Unique #Rows
ADD COMMENT
Topic
Name
1+5 =