def logout(request): lgout(request) return render( request, 'register/login.html', { 'message': 'You are logged out Successfully ....Enter below to login again' })
def login(request): lgout(request) if request.method == 'POST': inpusername = request.POST['username_input'] inppassword = request.POST['password_input'] x = encrypt(inppassword) user = authenticate(request, username=inpusername, password=x) if user is None: blank_form = LoginForm() message = "Error! Wrong username or password." flag = 1 context = {'form': blank_form, 'message': message, 'flag': flag} return render(request, 'account/login.html', context) else: lgin(request, user) CaseObjList = Case.objects.all() ReqObj = None for obj in CaseObjList: if obj.username == inpusername and obj.password == x: ReqObj = obj break prof = ReqObj.place id = prof.id return redirect(profile, id=id) else: #if get method, create a blank form. blank_form = LoginForm() message = "" flag = 0 context = {'form': blank_form, 'message': message, 'flag': flag} return render(request, 'account/login.html', context)
def login(request): lgout(request) if request.method == 'POST': username = request.POST.get('username', None) password = request.POST.get('passwd', None) user = authenticate(request, username=username, password=password) if user: lgin(request, user) return redirect('VMS:index') else: return render(request, 'VMS/login.html') else: return render(request, 'VMS/login.html')
def logout(request): lgout(request) return redirect('/')
def logout(request): lgout(request) return render(request,'registration/logout.html')
def logout(request): if request.method == 'POST': lgout(request) return HttpResponseRedirect('frontpage:index')
def logout(request): if not request.user.is_authenticated: return redirect('login') lgout(request) return redirect("login")
def logout(request): lgout(request) return redirect('login')
def logout(request): lgout(request) return HttpResponseRedirect('/')
def logout(request): lgout(request) return redirect('VMS:index')
def logout(request, forum_id): lgout(request) forum = get_forum_instance(forum_id) if forum: return redirect("base_forum", forum_id=forum.local_id) raise Http404
def logout(request): lgout(request) return redirect(reverse_lazy('users:login'))
def logout(request, forum_id): lgout(request) forum = get_forum_instance(forum_id) if forum: return redirect('base_forum', forum_id=forum.local_id) raise Http404
def logout(request): lgout(request) return redirect("login")
def logout(request): lgout(request) return render(request,'register/login.html',{'message':'You are logged out Successfully ....Enter below to login again'})
def logout(request): lgout(request) return render(request, 'registration/logout.html')