title: How to validate for unique email while signing up
body: <p>I need to check the email for unique. I've got some code:</p>
  
  <pre><code>def signup(request):
      if request.method == 'POST':
          form = SignupForm(request.POST)
          if form.is_valid():
              user = form.save(commit=False)
              user.is_active = False
              user.save()
              current_site = get_current_site(request)
              mail_subject = 'Activation'
              message = render_to_string('acc_active_email.html', {
                  'user': user,
                  'domain': current_site.domain,
                  'uid':urlsafe_base64_encode(force_bytes(user.pk)).decode(),
                  'token':account_activation_token.make_token(user),
              })
              to_email = form.cleaned_data.get('email')
              email = EmailMessage(
                          mail_subject, message, to=[to_email]
              )
              email.send()
              return HttpResponse('Check your email')
      else:
          form = SignupForm()
      return render(request, 'signup.html', {'form': form})
  </code></pre>
  
  <p>The issue is user is able to signup with existing emails, I am getting duplicate emails in my db.  </p>
  
  <p>I want to validate for unique email, user should be notified if email already in database, How can i achieve this, Is there any examples with some working code for registration. I am new to Django please help Thanks.</p>