Monday, December 19, 2011

Re: auth.login function not working as expected

On Sun, Dec 18, 2011 at 4:25 PM, Abraham Yusuf <bb6xt@yahoo.com> wrote:
> Hi all,
> I'm trying to login a user using django's authentication backend with the following:
> user=auth.authenticate(userid,pass)
> if user:
>   if user.is_active:
>      auth.login(request,user)
> I am getting TypeError login() takes exactly 1 argument (2 given). I've checked the docs and i can't find any problem there. Pls any help will be appreciated. Am using django 1.3.1, python 2.7 on ubuntu 11.04.

It sounds like you have solved your problem. In case you haven't, in
the auth.login() call above you have request <comma> user instead of
request <period> user. That would also give you the same error.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate