Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

make value of two tables unique django

class MyModel(models.Model):
  field1 = models.CharField(max_length=50)
  field2 = models.CharField(max_length=50)

  class Meta:
    unique_together = ('field1', 'field2',)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #tables #unique #django
ADD COMMENT
Topic
Name
3+9 =