--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Hi,2011/12/18 Abraham Yusuf <bb...@yahoo.com>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.
Do you have maybe another function called login(one_argument).
Cheers,J.--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--Linux User #236965 (counter.li.org)Po fueno, po fale, po malegro.
@return_json
def login(request)
In the decorator i was ripping off the raw post data and passing it to the view as arguments while the view itself only takes the request arg. Sorry for posting it anyway.
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.