From f3903e64d7c87caab7578760e241c10d24df64fa Mon Sep 17 00:00:00 2001 From: scayac Date: Tue, 7 Oct 2025 09:15:15 +0200 Subject: [PATCH] Ajout gestion suppression course AJAX Normalisation conversion date Ajout badge type course (unique/multi) --- main/templates/base.html | 2 +- main/templates/main.html | 67 +++++++++++++++++++++++++++++-- main/templatetags/temps_format.py | 15 ++++++- main/urls.py | 1 + main/views.py | 36 ++++++++++------- 5 files changed, 102 insertions(+), 19 deletions(-) diff --git a/main/templates/base.html b/main/templates/base.html index 6e6ca74..7e1ab3a 100644 --- a/main/templates/base.html +++ b/main/templates/base.html @@ -62,7 +62,7 @@ - {{ title }} + {{ title }} {% block content %}{% endblock %} diff --git a/main/templates/main.html b/main/templates/main.html index 5aefb23..f818995 100644 --- a/main/templates/main.html +++ b/main/templates/main.html @@ -1,5 +1,6 @@ {% extends 'base.html' %} {% block content %} +{% load temps_format %}
@@ -11,14 +12,23 @@
    {% for course in courses %}
  • - {{ course.nom }} ({{ course.date }}) + {{ course.nom }} ({{ course.date|format_date }}) + {% if course.type == 'unique' %} + Unique + {% elif course.type == 'multi' %} + Multi + {% endif %} +
    - + +
  • {% empty %} @@ -36,7 +46,27 @@
-
+ + +