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
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
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
3 matches
Mail list logo