Set unique=True
for a cat
field (docs):
This is enforced at the database level and by model validation. If you try to save a model with a duplicate value in a unique field, a
django.db.IntegrityError
will be raised by the model’ssave()
method.
cat = models.CharField(max_length=2, choices=CATS, unique=True)