Re: auth.login function not working as expected

2011-12-19 Thread DrBloodmoney
On Sun, Dec 18, 2011 at 4:25 PM, Abraham Yusuf 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

RE: auth.login function not working as expected

2011-12-18 Thread Abraham Yusuf
Hi all, I found a solution to the problem so i taught i'd let you know. It was really an oversight, my login view is like so: @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

Re: auth.login function not working as expected

2011-12-18 Thread Jhonny5
2011/12/18 Jhonny5 > Hi, > 2011/12/18 Abraham Yusuf > >> 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: >>

Re: auth.login function not working as expected

2011-12-18 Thread Jhonny5
Hi, 2011/12/18 Abraham Yusuf > 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

auth.login function not working as expected

2011-12-18 Thread Abraham Yusuf
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