[Answered ]-Django Model Field Uniqueness Validation

2👍

Use unique_together.

class Meta:
    unique_together = ('id', 'password', 'device_id')

It makes every model have a unique set of those three (which is what you want).

Leave a comment