[Django #12] Adding user authentication
This commit is contained in:
parent
5cd127f2c1
commit
c2a3e1cf62
1 changed files with 3 additions and 1 deletions
|
@ -158,6 +158,8 @@ def login(request):
|
||||||
if login_form.is_valid():
|
if login_form.is_valid():
|
||||||
auth_login(request, login_form.get_user())
|
auth_login(request, login_form.get_user())
|
||||||
return redirect('newrandomIP')
|
return redirect('newrandomIP')
|
||||||
|
else:
|
||||||
|
print("fail login")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
login_form = AuthenticationForm()
|
login_form = AuthenticationForm()
|
||||||
|
|
Loading…
Reference in a new issue