aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/qsjps.html14
-rw-r--r--views.py2
2 files changed, 15 insertions, 1 deletions
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 %}
+ <h3>Trouver une salle entre {{ form.begin.value }} et {{ form.end.value }}</h3>
+ <ul>
+ {% for room in rooms %}
+ <li>{{ room }}</li>
+ {% empty %}
+ <p>Aucune salle trouvée</p>
+ {% endfor %}
+ </ul>
+{% 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: