예제 #1
0
def logout(request):
    try:
        djangoLogout(request)
        request.session.clear()
    except:
        return JsonResponse({'state': stateCode.ERROR, 'info': _('logout failed')})
    else:
        return JsonResponse({'state': stateCode.SUCCESS, 'info': _('logout success')})
예제 #2
0
def logout(request):
    try:
        djangoLogout(request)
        request.session.clear()
    except:
        return JsonResponse({
            'state': stateCode.ERROR,
            'info': _('logout failed')
        })
    else:
        return JsonResponse({
            'state': stateCode.SUCCESS,
            'info': _('logout success')
        })
예제 #3
0
파일: views.py 프로젝트: bxm156/ServicePad
def logout(request):
    if request.user.is_authenticated():
        djangoLogout(request)
    return redirect("/")
    
예제 #4
0
def logout(request):
	djangoLogout(request)

	return success()
예제 #5
0
def logout(request):
    '''
	Backend to perform logout.
	'''
    djangoLogout(request)
    return redirect('/login')
def logout(request):
	djangoLogout(request)
	return HttpResponse('You have successfully signed out.')

	
예제 #7
0
파일: views.py 프로젝트: joaogodinho/sirs
def logout(request):
    djangoLogout(request)
    return redirect('sirs_users:login')
예제 #8
0
def logout(request):
    djangoLogout(request)
    return HttpResponseRedirect('/')
예제 #9
0
def logout(request):
    if request.user.is_authenticated():
        djangoLogout(request)
    return HttpResponseRedirect(reverse('books:index'))
예제 #10
0
def logout(request):
    if request.user.is_authenticated():
        djangoLogout(request)
    return redirect("/")
예제 #11
0
def logout(request):
    if request.user.is_authenticated:
        djangoLogout(request)
        return render(request, 'logout.html')
    else:
        return render(request, 'logout.html')
예제 #12
0
def logout(request):
    djangoLogout(request)
    return redirect("/")
예제 #13
0
def logout(request):
    djangoLogout(request)
    if "next" in request.GET:
        return redirect(request.GET["next"])
    else:
        return redirect("status:root")