Answers for "make value of two tables unique django"

0

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',)
Posted by: Guest on June-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language