diff --git a/idhub/templates/idhub/base.html b/idhub/templates/idhub/base.html index 16e20a7..07391ee 100644 --- a/idhub/templates/idhub/base.html +++ b/idhub/templates/idhub/base.html @@ -51,9 +51,9 @@
diff --git a/idhub/templates/idhub/base_admin.html b/idhub/templates/idhub/base_admin.html index e4872d8..6604e9e 100644 --- a/idhub/templates/idhub/base_admin.html +++ b/idhub/templates/idhub/base_admin.html @@ -51,9 +51,9 @@ diff --git a/idhub/urls.py b/idhub/urls.py index f9e1158..6a577d2 100644 --- a/idhub/urls.py +++ b/idhub/urls.py @@ -14,7 +14,7 @@ Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ -from django.contrib import admin +from django.contrib.auth import views as auth_views from django.urls import path from . import views @@ -24,6 +24,7 @@ app_name = 'idhub' urlpatterns = [ # path("", views.index, name="index"), path('login/', views.LoginView.as_view(), name='login'), + path('logout/', auth_views.LogoutView.as_view(), name='logout'), path('user/dashboard/', views.UserDashboardView.as_view(), name='user_dashboard'), - path('admin/dashboard/', views.AdminDashboardView.as_view(), name='user_dashboard'), + path('admin/dashboard/', views.AdminDashboardView.as_view(), name='admin_dashboard'), ] diff --git a/trustchain_idhub/settings.py b/trustchain_idhub/settings.py index 5b589ea..94ad7ef 100644 --- a/trustchain_idhub/settings.py +++ b/trustchain_idhub/settings.py @@ -124,3 +124,4 @@ STATIC_URL = 'static/' # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +LOGOUT_REDIRECT_URL = 'idhub:login'