Hello Sebastjan, That means I would not be using djanago.contrib.auth.views.login, right?
Sebastjan Trepca wrote: > Sure, > > you just use email field when authenticating user. > > Like this: > > from django.contrib.auth import authenticate > user = authenticate(email='[EMAIL PROTECTED]', password='secret') > if user is not None: > if user.is_active: > print "You provided a correct username and password!" > else: > print "Your account has been disabled!" > else: > print "Your username and password were incorrect." > > Sebastjan > > On 1/20/08, J. Pablo Fern�ndez <[EMAIL PROTECTED]> wrote: >> >> Hello, >> Is it possible to use email instead of username for users. So for logging >> in I would ask email and password (no username)? >> Thanks. >> -- >> J. Pablo Fern�ndez <[EMAIL PROTECTED]> (http://pupeno.com) >> >> >> > >> > > -- J. Pablo Fernández <[EMAIL PROTECTED]> (http://pupeno.com) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

