On Sun, 2009-08-02 at 20:21 -0700, Dana wrote:
> Oops i mean username, not password.
> 
> Im not clear on how I can get this to override the django login
> functionality. Im reading more up on custom auth backends but Ill
> admit it's a little confusing.

You write a custom authentication function that compares the username
and password supplied by the user in the login form against the email
address and password fields in the User model -- fetch the User
instance(s) matching the email address and then use the check_password()
method on the User instance to see if it's valid.

It should only a couple of lines of code in the skeleton code described
here:
http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backend

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to