1👍
In your models.py
UserModel(models.Model):
...
email = models.EmailField(unique=True)
...
This will ensure that you don’t have to write any logic on your view to ensure uniqueness of a field.
Source:stackexchange.com
1👍
In your models.py
UserModel(models.Model):
...
email = models.EmailField(unique=True)
...
This will ensure that you don’t have to write any logic on your view to ensure uniqueness of a field.