Ajout du context processor

This commit is contained in:
Soriba SYLLA
2026-08-31 09:47:23 +00:00
parent 1e477287da
commit 18942f406b
85 changed files with 16 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -80,6 +80,7 @@ TEMPLATES = [
"django.template.context_processors.request", "django.template.context_processors.request",
"django.contrib.auth.context_processors.auth", "django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages", "django.contrib.messages.context_processors.messages",
"contexte_universel.contexte_universel",
], ],
}, },
}, },
@@ -138,6 +139,8 @@ USE_TZ = True
STATIC_URL = "static/" STATIC_URL = "static/"
STATIC_ROOT = BASE_DIR / 'staticfiles'
STATICFILES_DIRS = [ STATICFILES_DIRS = [
BASE_DIR / "static", BASE_DIR / "static",
] ]

View File

@@ -1,8 +1,8 @@
<div class="col-1 bg-danger border d-flex flex-column vh-100 pt-5 sticky-top"> <div class="col-1 bg-danger border d-flex flex-column vh-100 pt-5 sticky-top">
<a href="http://test-sirh.cerfig.org:89/" class="text-white text-center fw-bold text-decoration-none mb-4" style="font-size:1.4em"> <a href="{{ LIEN_SIRH }}" class="text-white text-center fw-bold text-decoration-none mb-4" style="font-size:1.4em">
<i class="bi bi-people-fill fs-1 d-block"></i>SIRH <i class="bi bi-people-fill fs-1 d-block"></i>SIRH
</a> </a>
<a href="http://test-sgl.cerfig.org:89/" class="text-white text-center fw-bold text-decoration-none mb-4" style="font-size:1.4em"> <a href="{{ LIEN_SGL }}" class="text-white text-center fw-bold text-decoration-none mb-4" style="font-size:1.4em">
<i class="bi bi-building-gear fs-1 d-block"></i> SGL <i class="bi bi-building-gear fs-1 d-block"></i> SGL
</a> </a>
</div> </div>

View File

@@ -1,4 +1,6 @@
{% load tags_personnaliser %}
<!-- ----------------------------------- Modal équipement à rendre -------------------------------- --> <!-- ----------------------------------- Modal équipement à rendre -------------------------------- -->
<div class="modal fade" id="aRendreModal" tabindex="-1" aria-labelledby="aRendreModalLabel"> <div class="modal fade" id="aRendreModal" tabindex="-1" aria-labelledby="aRendreModalLabel">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">

View File

@@ -15,4 +15,4 @@ def connexion(request):
def deconnexion(request): def deconnexion(request):
"""Gérez la déconnexion des utilisateurs.""" """Gérez la déconnexion des utilisateurs."""
logout(request) logout(request)
return redirect(settings.SSO_LOGOUT_URL) return redirect("http://authentification.cerfig.org/login/")

7
contexte_universel.py Normal file
View File

@@ -0,0 +1,7 @@
from decouple import config
def contexte_universel(request):
return {
"LIEN_SIRH": config("SIRH_LIEN"),
"LIEN_SGL": config("SGL_LIEN")
}