title: Make User email unique django
body: <p>How can I make a Django User email unique when a user is signing up?</p>
  <p><strong>forms.py</strong></p>
  <pre><code>class SignUpForm(UserCreationForm):
      email = forms.EmailField(required=True)
  
      class Meta:
          model = User
          fields = (&quot;username&quot;, &quot;email&quot;, &quot;password1&quot;, &quot;password2&quot;)
  
      def save(self, commit=True):
          user = super(SignUpForm, self).save(commit=False)
          user.email = self.cleaned_data[&quot;email&quot;]
          if commit:
              user.save()
          return user
  </code></pre>
  <p>I'm using the from django.contrib.auth.models User.
  Do I need to override the User in the model. Currently the model doesn't make a reference to User.</p>
  <p><strong>views.py</strong></p>
  <pre><code>class SignUp(generic.CreateView):
      form_class = SignUpForm
      success_url = reverse_lazy('login')
      template_name = 'signup.html'
  </code></pre>