[Fixed]-How do I use Django's update view to check if email is unique?

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.

Leave a comment