From 526b83ec20d8cadc9c58d94aa53a2d02ec6a840b Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Wed, 11 Dec 2024 18:42:35 +0100 Subject: [PATCH] Ajout de cache pour la page d'un jour --- .../templates/agenda_culturel/page-event.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/agenda_culturel/templates/agenda_culturel/page-event.html b/src/agenda_culturel/templates/agenda_culturel/page-event.html index 42f0276..2012c9f 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-event.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-event.html @@ -3,6 +3,7 @@ {% load cat_extra %} {% load utils_extra %} {% load event_extra %} +{% load cache %} {% block title %}{% block og_title %}{{ event.title }}{% endblock %}{% endblock %} @@ -16,6 +17,9 @@ {% block content %} +{% with cache_timeout=user.is_authenticated|yesno:"30,600" %} +{% cache cache_timeout event user.is_authenticated event %} +
{% include "agenda_culturel/single-event/event-single-inc.html" with event=event filter=filter %} @@ -130,5 +134,7 @@
+{% endcache %} +{% endwith %} {% endblock %} \ No newline at end of file