On 6/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi Everyone,
>     I'm trying out django and it's been really easy getting the auth
> library up and running. I hit an issue where I want to login a new
> user right after they've registered and take them to their profile
> page.
>
> I tried calling the auth.login method but I got an error saying that
> the new_user object doesn't have the attribute error. I guess this is
> because the session and auth middlewares didn't get to alter new_user.
>
> Does django provide a quick way of resolving this?

Yes. The 'backend' attribute that is being complained about is an
attribute that is decorated onto the user object by the authenticate()
method (django.contrib.auth.authenticate()). If you call authenticate,
providing the login credentials, you will get a 'decorated' user that
can then be used in the login method.

Yours,
Russ Magee

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to