I have a Tag model, that must have a name field that needs to be unique, but only for that user's tags.
So that one user can't create two 'tagname' tags, but many different users can (create a tag with the same name).
The field must be unique inside the models that relate to the User.
This is the Model.
class User(AbstractUser): email = models.EmailField(unique=True) class Tag(models.Model): name = models.CharField(max_length=30, unique=True) user = models.ForeignKey(User, null=True, on_delete=models.CASCADE, related_name='tags')
Metatagunique_togetheris what's needed: docs.djangoproject.com/en/2.2/ref/models/options