def logout(request, *args, **kwargs): if request.session.get('unsafe_logout'): return render(request, 'unsafe_logout.html') else: kwargs['next_page'] = request.GET.get( 'next', kwargs.get('next_page', settings.LOGOUT_URL)) return dj_logout(request, *args, **kwargs)
def logout(request, *args, **kwargs): if request.session.get('unsafe_logout'): return render_to_response('unsafe_logout.html', {}, context_instance=RequestContext(request)) else: kwargs['next_page'] = request.GET.get('next', kwargs.get('next_page', settings.LOGOUT_URL)) return dj_logout(request, *args, **kwargs)
def logout(request, *args, **kwargs): if request.session.get('unsafe_logout'): return render_to_response('unsafe_logout.html', {}, context_instance=RequestContext(request)) else: kwargs['next_page'] = request.GET.get( 'next', kwargs.get('next_page', settings.LOGOUT_URL)) return dj_logout(request, *args, **kwargs)
def logout(request): if request.method == "POST": form = LogoutForm(request.POST) if form.is_valid(): create_audit_event( EVENT_TYPES.AUTHORISATION, ENDPOINT.UI, request, None, description=( "Logged out %s." % ("admin" if request.user.is_superuser else "user")), ) dj_logout(request) return HttpResponse(status=204) return HttpResponseBadRequest(json.dumps(form.errors), content_type="application/json") return HttpResponseNotAllowed([request.method])
def logout(request): if request.method == 'POST': form = LogoutForm(request.POST) if form.is_valid(): return dj_logout(request, next_page=reverse('login')) else: form = LogoutForm() return render(request, 'maasserver/logout_confirm.html', {'form': form})
def logout(request): if request.method == 'POST': form = LogoutForm(request.POST) if form.is_valid(): create_audit_event( EVENT_TYPES.AUTHORISATION, ENDPOINT.UI, request, None, description=( "%s" % ('Admin' if request.user.is_superuser else 'User') + " '%(username)s' logged out.")) return dj_logout(request, next_page=reverse('login')) else: form = LogoutForm() return render(request, 'maasserver/logout_confirm.html', {'form': form})
def logout(request): if request.method == "POST": form = LogoutForm(request.POST) if form.is_valid(): create_audit_event( EVENT_TYPES.AUTHORISATION, ENDPOINT.UI, request, None, description=( "Logged out %s." % ("admin" if request.user.is_superuser else "user") ), ) return dj_logout(request, next_page=reverse("login")) else: form = LogoutForm() return render(request, "maasserver/logout_confirm.html", {"form": form})
def logout(request): dj_logout(request) return redirect(reverse_lazy('index'))
def logout(request): messages.info(request, "You have been logged out.") return dj_logout(request, next_page=reverse('login'))
def logout(request, *args, **kwargs): if request.session.get("unsafe_logout"): return render_to_response("unsafe_logout.html", {}, context_instance=RequestContext(request)) else: kwargs["next_page"] = request.GET.get("next", kwargs.get("next_page", settings.LOGOUT_URL)) return dj_logout(request, *args, **kwargs)