aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/qsjps_form.html (renamed from templates/form_qsjps.html)2
-rw-r--r--views.py11
2 files changed, 7 insertions, 6 deletions
diff --git a/templates/form_qsjps.html b/templates/qsjps_form.html
index 3a9bcf8..bc5e363 100644
--- a/templates/form_qsjps.html
+++ b/templates/qsjps_form.html
@@ -1,6 +1,6 @@
{% extends "index.html" %}
-{% block title %}QSJPS – {% endblock %}
+{% block title %}Trouver une salle – {% endblock %}
{% block body %}
<h3>Trouver une salle</h3>
diff --git a/views.py b/views.py
index e8fc259..1c82b03 100644
--- a/views.py
+++ b/views.py
@@ -154,13 +154,14 @@ def qsjps(request):
if form.is_valid():
# Formulaire validé
return None
- else:
- # Formulaire invalide, on le raffiche avec une erreur
- return render(request, "form_qsjps.html", {"form": form})
+ # Si le formulaire est invalide, on ré-affiche le formulaire
+ # avec les erreurs
else:
- # Sinon, affichage d’un formulaire vide
+ # Si le formulaire n’a pas été soumis, on en instancie un
+ # nouveau
form = QSJPSForm()
- return render(request, "form_qsjps.html", {"form": form})
+
+ return render(request, "qsjps_form.html", {"form": form})
def ctx_processor(request):
return {"celcatsanitizer_version": edt.VERSION}