Re: django 1.11 login user

2017-05-08 Thread Melvyn Sopacua
On Friday 05 May 2017 10:03:47 sum abiut wrote: > i have try to login user using the guide from > https://docs.djangoproject.com/en/1.11/topics/auth/default/ > > but get an error. Can someone advise what i am doin wrong here It's a flaw in the docs. It assumes that by now you are familiar with

Re: django 1.11 login user

2017-05-04 Thread ludovic coues
My guess is that your error happen when accessing the page before submitting the firm. So you don't have any POST data and trying to access any key rise an error. You can use request.POST.get("key", "default_value") or you can write an if and testing that request.method is "POST". If I'm wrong, I

django 1.11 login user

2017-05-04 Thread sum abiut
Hi, i have try to login user using the guide from https://docs.djangoproject.com/en/1.11/topics/auth/default/ but get an error. Can someone advise what i am doin wrong here he is my view.py #Authentication user def login(request): username=request.POST['username'] password=request.POS