From b9f165c1e6797910594ef7cbfaafcf77e2af5e8d Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 24 Sep 2024 11:31:05 +0200 Subject: [PATCH] chore(index): Move the view inside dgsi --- src/app/urls.py | 1 - src/dgsi/urls.py | 4 ++++ src/dgsi/views.py | 4 ++++ src/shared/templates/_hero.html | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/urls.py b/src/app/urls.py index 7a3942a..5d0ec79 100644 --- a/src/app/urls.py +++ b/src/app/urls.py @@ -21,7 +21,6 @@ from django.urls import include, path from django.views.generic import TemplateView urlpatterns = [ - path("", TemplateView.as_view(template_name="home.html"), name="index"), path("login", TemplateView.as_view(template_name="login.html"), name="login"), path("", include("dgsi.urls")), path("accounts/", include("allauth.urls")), diff --git a/src/dgsi/urls.py b/src/dgsi/urls.py index 107b945..71cd35f 100644 --- a/src/dgsi/urls.py +++ b/src/dgsi/urls.py @@ -5,6 +5,9 @@ from . import views app_name = "dgsi" urlpatterns = [ + # Misc views + path("", views.IndexView.as_view(), name="dgn-index"), + # Account views path("accounts/profile/", views.ProfileView.as_view(), name="dgn-profile"), path( "accounts/create-kanidm/", @@ -16,6 +19,7 @@ urlpatterns = [ views.TemplateView.as_view(template_name="accounts/forbidden_category.html"), name="dgn-forbidden_account", ), + # Services views path("services/", views.ServiceListView.as_view(), name="dgn-services"), path( "services/redirect/", diff --git a/src/dgsi/views.py b/src/dgsi/views.py index 5b7d3c1..47ea5dc 100644 --- a/src/dgsi/views.py +++ b/src/dgsi/views.py @@ -16,6 +16,10 @@ from dgsi.models import Service, User from shared.kanidm import client +class IndexView(TemplateView): + template_name = "dgsi/index.html" + + class ProfileView(LoginRequiredMixin, TemplateView): template_name = "dgsi/profile.html" diff --git a/src/shared/templates/_hero.html b/src/shared/templates/_hero.html index 4fd16c8..9267783 100644 --- a/src/shared/templates/_hero.html +++ b/src/shared/templates/_hero.html @@ -6,7 +6,7 @@