def logout( request, next_page=None ): """ Redirects to CAS logout page """ from django.contrib.auth import logout as app_logout app_logout( request ) if not next_page: next_page = _redirect_url( request ) if settings.CAS_LOGOUT_COMPLETELY: return HttpResponseRedirect( _logout_url( request, next_page ) ) else: return HttpResponseRedirect( next_page )
def logout(request, next_page=None): """ Redirects to CAS logout page """ from django.contrib.auth import logout as app_logout app_logout(request) if not next_page: next_page = _redirect_url(request) if settings.CAS_LOGOUT_COMPLETELY: return HttpResponseRedirect(_logout_url(request, next_page)) else: return HttpResponseRedirect(next_page)
def logout(request): if request.method == 'POST': app_logout(request) return HttpResponse('OK')
def logout(request): app_logout(request) return redirect("login")
def logout(request): app_logout(request) return redirect('http://localhost:8000/')
def get(self, request, *args, **kwargs): if request.user.is_authenticated(): app_logout(request) return super(LogoutView, self).get(request, *args, **kwargs)
def post(self, request): app_logout(request) return Response(status=204)
def submit_logout(request): app_logout(request) return redirect('login')
def post(self, request): app_logout(request) return JsonResponse({'status': 'ok'})