diff options
author | Alban Gruin | 2018-09-29 17:02:43 +0200 |
---|---|---|
committer | Alban Gruin | 2018-09-29 17:02:43 +0200 |
commit | fc1fc472931cae0ba3d0a0103c328f85b7b52586 (patch) | |
tree | f6be7fb6463ff29f26de8db5386729a4fc9f975b /views.py | |
parent | a4000b40682c93efacec31308dce4a32eeac7ef7 (diff) | |
parent | c95740a4d97fc579f4f12a6abf01eac446fde1cc (diff) |
Merge branch 'stable/0.14.z' into prod/pa1ch/0.14.zv0.14.2-pa1ch
Signed-off-by: Alban Gruin <alban at pa1ch dot fr>
Diffstat (limited to 'views.py')
-rw-r--r-- | views.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -259,6 +259,8 @@ def room_timetable(request, room_slug, year=None, week=None): @csrf_exempt def qsjps(request): + status = 200 + if request.method == "POST": # Si on traite un formulaire, on le valide form = QSJPSForm(request.POST) @@ -278,12 +280,13 @@ def qsjps(request): # Si le formulaire est invalide, on ré-affiche le formulaire # avec les erreurs + status = 400 else: # Si le formulaire n’a pas été soumis, on en instancie un # nouveau form = QSJPSForm() - return render(request, "qsjps_form.html", {"form": form}) + return render(request, "qsjps_form.html", {"form": form}, status=status) def ctx_processor(request): |