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
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", TemplateView.as_view(template_name="home.html"), name="index"),
|
|
||||||
path("login", TemplateView.as_view(template_name="login.html"), name="login"),
|
path("login", TemplateView.as_view(template_name="login.html"), name="login"),
|
||||||
path("", include("dgsi.urls")),
|
path("", include("dgsi.urls")),
|
||||||
path("accounts/", include("allauth.urls")),
|
path("accounts/", include("allauth.urls")),
|
||||||
|
|
|
@ -5,6 +5,9 @@ from . import views
|
||||||
app_name = "dgsi"
|
app_name = "dgsi"
|
||||||
|
|
||||||
urlpatterns = [
|
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/profile/", views.ProfileView.as_view(), name="dgn-profile"),
|
||||||
path(
|
path(
|
||||||
"accounts/create-kanidm/",
|
"accounts/create-kanidm/",
|
||||||
|
@ -16,6 +19,7 @@ urlpatterns = [
|
||||||
views.TemplateView.as_view(template_name="accounts/forbidden_category.html"),
|
views.TemplateView.as_view(template_name="accounts/forbidden_category.html"),
|
||||||
name="dgn-forbidden_account",
|
name="dgn-forbidden_account",
|
||||||
),
|
),
|
||||||
|
# Services views
|
||||||
path("services/", views.ServiceListView.as_view(), name="dgn-services"),
|
path("services/", views.ServiceListView.as_view(), name="dgn-services"),
|
||||||
path(
|
path(
|
||||||
"services/redirect/<int:pk>",
|
"services/redirect/<int:pk>",
|
||||||
|
|
|
@ -16,6 +16,10 @@ from dgsi.models import Service, User
|
||||||
from shared.kanidm import client
|
from shared.kanidm import client
|
||||||
|
|
||||||
|
|
||||||
|
class IndexView(TemplateView):
|
||||||
|
template_name = "dgsi/index.html"
|
||||||
|
|
||||||
|
|
||||||
class ProfileView(LoginRequiredMixin, TemplateView):
|
class ProfileView(LoginRequiredMixin, TemplateView):
|
||||||
template_name = "dgsi/profile.html"
|
template_name = "dgsi/profile.html"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="grid has-3-cols">
|
<div class="grid has-3-cols">
|
||||||
<div class="cell is-col-span-2">
|
<div class="cell is-col-span-2">
|
||||||
<h1 class="title">
|
<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>
|
</h1>
|
||||||
<h2 class="subtitle mt-2">Système d'information de la DGNum</h2>
|
<h2 class="subtitle mt-2">Système d'information de la DGNum</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue