title: How to use email instead of username for user authentication?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/778382/accepting-email-address-as-username-in-django">Accepting email address as username in Django</a>  </p>
  </blockquote>
  
  
  
  <p>The authentication model provided along with Django is based on
  username.</p>
  
  <p>What to do to change the authentication based on email instead of
  username?</p>
  
  <p><strong>To be more specific</strong>:</p>
  
  <p>With username authentication, to login user we do the following:</p>
  
  <pre><code> user = authenticate(name,password)
   .......
   login(request,user)
  </code></pre>
  
  <p>What to write for the above statements if we are authenticating
  using email?</p>
  
  <p><strong>For form</strong>:</p>
  
  <p>I am planning to write my own form which shows the fields
  email, password and the validation.
  Is this the correct approach? </p>