Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if request.method == "POST":
- form = ConnexionForm(request.POST)
- if form.is_valid():
- username = form.cleaned_data["Username"]
- user = authenticate(username=username, password=username)
- if user:
- login(request, user)
- UserAuthentified = True
- else:
- Error = True
- else:
- Error = True
- else:
- form = ConnexionForm()
- request.user.username
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement