Re: Getting exception 'User' object has no attribute 'backend'

2008-01-10 Thread Shev
On a related note, I ran into a situation where I needed to login a user automatically, without knowing the plaintext password. So I did: the_user.backend='django.contrib.auth.backends.ModelBackend' login(request, the_user) ...and skipped the usage of authenticate(). If this is a terrible

Re: Getting exception 'User' object has no attribute 'backend'

2008-01-02 Thread James Bennett
On Jan 2, 2008 1:57 PM, shabda <[EMAIL PROTECTED]> wrote: > I have this code, > from django.contrib.auth import login > user = User.objects.get(username = > login_form.cleaned_data['username']) > login(request, user) > Which is giving me exception 'User' object

Getting exception 'User' object has no attribute 'backend'

2008-01-02 Thread shabda
I have this code, from django.contrib.auth import login user = User.objects.get(username = login_form.cleaned_data['username']) login(request, user) Which is giving me exception 'User' object has no attribute 'backend' Traceback: File