chore(index): Move the view inside dgsi
This commit is contained in:
parent
e10d33176b
commit
b9f165c1e6
4 changed files with 9 additions and 2 deletions
|
@ -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")),
|
||||
|
|
|
@ -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/<int:pk>",
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="grid has-3-cols">
|
||||
<div class="cell is-col-span-2">
|
||||
<h1 class="title">
|
||||
<a href="{% url 'index' %}" class="has-text-dark">Dossier Général des Services Informagiques</a>
|
||||
<a href="{% url 'dgsi:dgn-index' %}" class="has-text-dark">Dossier Général des Services Informagiques</a>
|
||||
</h1>
|
||||
<h2 class="subtitle mt-2">Système d'information de la DGNum</h2>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue