From 67433f2b72b9ab85c687e1b3282d9ff11a6e60ef Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Fri, 18 Oct 2024 18:14:55 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20debug=20(et=20correction=20de=20quelque?= =?UTF-8?q?s=20d=C3=A9tails)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/settings/base.py | 24 ++++++++++++++++++- .../templates/agenda_culturel/day-inc.html | 4 ++-- .../agenda_culturel/event-location-inc.html | 4 ++-- .../templates/agenda_culturel/filter-inc.html | 7 ++---- .../forms/category-checkbox.html | 2 +- .../agenda_culturel/forms/tag-checkbox.html | 2 +- .../templates/agenda_culturel/page-month.html | 2 +- .../templates/agenda_culturel/page-week.html | 4 ++-- 8 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/agenda_culturel/settings/base.py b/src/agenda_culturel/settings/base.py index 1c51897..7a6ebe0 100644 --- a/src/agenda_culturel/settings/base.py +++ b/src/agenda_culturel/settings/base.py @@ -253,4 +253,26 @@ ROBOTS_USE_SITEMAP = False if DEBUG: import socket hostname, _, ips = socket.gethostbyname_ex(socket.gethostname()) - INTERNAL_IPS = [ip[: ip.rfind(".")] + ".1" for ip in ips] + ["127.0.0.1", "10.0.2.2"] \ No newline at end of file + INTERNAL_IPS = [ip[: ip.rfind(".")] + ".1" for ip in ips] + ["127.0.0.1", "10.0.2.2"] + +# logging + +level_debug = "DEBUG" if DEBUG else "ERROR" +LOGGING = { + "version": 1, + "disable_existing_loggers": False, + "handlers": { + "file": { + "level": level_debug, + "class": "logging.FileHandler", + "filename": "backend.log", + }, + }, + "loggers": { + "django": { + "handlers": ["file"], + "level": level_debug, + "propagate": True, + }, + }, +} diff --git a/src/agenda_culturel/templates/agenda_culturel/day-inc.html b/src/agenda_culturel/templates/agenda_culturel/day-inc.html index 873ea0b..4fccf83 100644 --- a/src/agenda_culturel/templates/agenda_culturel/day-inc.html +++ b/src/agenda_culturel/templates/agenda_culturel/day-inc.html @@ -20,10 +20,10 @@ {% endif %} - <{% if headers %}{{ headers }}{% else %}h2{% endif %}>{{ day.date | date:"l j" }} + <{% if headers != "" %}{{ headers }}{% else %}h2{% endif %}>{{ day.date | date:"l j" }} {% if day.events %} - {% if resume %} + {% if resume == 1 %}