Make ’email’ field to be unique in Django Model

To create a unique email field in your Django User model, so that only one user can be associated with an email address, add below to your model:

from django.contrib.auth.models import User

Class UserModel(UserCreationForm):
  email = forms.EmailField(required=True)


Rate this Article
User Review
3 (5 votes)

About Matthias 33 Articles
I am a Software Engineer from Houston, TX who love to write codes that brings great ideas to live. In my professional life, I have created software for different industries including Oil & Gas, Finance, Service Provider, Cloud Computing and Embedded Systems. When not writting codes, i enjoy travelling, good music and photography. You can reach me at

1 Comment

Leave a Reply

Your email address will not be published.