On 10/9/06, SanPy <[EMAIL PROTECTED]> wrote:
>
> Chris Moffitt wrote:
> > >
> > I've was tripped up by this too. Can you try something like this:
> >
> > user = authenticate(username=data[*'user_name'*],
> > password=data[*'password'*])
> > login(request, user)
> >
> > This seems to work for me. If you want to see the full code, it's here -
> > http://satchmo.python-hosting.com/file/trunk/satchmo/shop/views/account.py
> >
> > -Chris
[snip]
> Does anyone know of a way to login a user without having to
> authenticate first? Or authenticating with an encrypted password?
The problem is probably that the user.backend attribute does not
exist. As a hack, you could just set it.
user.backend = 'django.contrib.auth.backends.ModelBackend'
login(request, user)
There really ought to be nice way for django to deal with this
situation, I have some ideas, but it will be awhile before I get
around to implementing them.
Joseph
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---