From 175e1c1139a77a02f3c52d77a4d2b118c2b2e578 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Thu, 18 Jan 2018 12:17:08 +0100 Subject: Ajout d’une template pour lister les salles trouvées --- templates/qsjps.html | 14 ++++++++++++++ views.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 templates/qsjps.html diff --git a/templates/qsjps.html b/templates/qsjps.html new file mode 100644 index 0000000..73290de --- /dev/null +++ b/templates/qsjps.html @@ -0,0 +1,14 @@ +{% extends "index.html" %} + +{% block title %}Trouver une salle – {% endblock %} + +{% block body %} +

Trouver une salle entre {{ form.begin.value }} et {{ form.end.value }}

+ +{% endblock %} diff --git a/views.py b/views.py index 1c82b03..0231c9e 100644 --- a/views.py +++ b/views.py @@ -153,7 +153,7 @@ def qsjps(request): form = QSJPSForm(request.POST) if form.is_valid(): # Formulaire validé - return None + return render(request, "qsjps.html", {"rooms": [], "form": form}) # Si le formulaire est invalide, on ré-affiche le formulaire # avec les erreurs else: -- cgit v1.2.1