[Django #12] Adding user authentication

This commit is contained in:
kjg 2020-08-13 00:27:36 +09:00
parent 5cd127f2c1
commit c2a3e1cf62

View file

@ -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()