From 63874cf9820ee82050d3d11ba12212c197821fcd Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Sat, 27 Jan 2024 18:06:05 +0100 Subject: add impersonation --- accounts/urls.py | 1 + accounts/views.py | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'accounts') diff --git a/accounts/urls.py b/accounts/urls.py index 57a649d..76a54e6 100644 --- a/accounts/urls.py +++ b/accounts/urls.py @@ -14,4 +14,5 @@ urlpatterns = [ path('oauth_disconnect/', views.oauth_disconnect, name='oauth_disconnect'), path('auth_connect/', views.auth_connect, name='auth_connect'), path('user_switcher/', views.user_switcher, name='user_switcher'), + path('logout/', views.logout_view, name='logout'), ] diff --git a/accounts/views.py b/accounts/views.py index f04f495..9ecb15f 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -789,3 +789,8 @@ def edit(request, code): def terms(request): context = {} return render(request, 'accounts/terms.html', context) + + +def logout_view(request): + logout(request) + return HttpResponseRedirect('/') \ No newline at end of file -- cgit v1.2.1