From 8c0cb82e903a097381b0a02481b6a948c85a81a1 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 9 Oct 2023 11:24:11 +0200 Subject: [PATCH] redirect index to login --- idhub/urls.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/idhub/urls.py b/idhub/urls.py index 6a577d2..3d9b9ec 100644 --- a/idhub/urls.py +++ b/idhub/urls.py @@ -15,14 +15,15 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib.auth import views as auth_views -from django.urls import path +from django.views.generic import RedirectView +from django.urls import path, reverse_lazy from . import views app_name = 'idhub' urlpatterns = [ - # path("", views.index, name="index"), + path("", RedirectView.as_view(url=reverse_lazy('idhub:login'), permanent=False)), 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'),