Commit 7503ff0e authored by raida's avatar raida

Test6

parent ea64ef9d
......@@ -9,26 +9,12 @@
{% endblock %}
{% block content %}
{% if wei %}
{% if wei or old or quest %}
<h1>DEBUG part</h1>
{{ old }}
{{ wei }}
{% if wei.nom %}<p>{{wei.nom}}</p>{% endif %}
{% if wei.prenom %}<p>{{wei.prenom}}</p>{% endif %}
{% if wei.genre %}<p>{{wei.genre}}</p>{% endif %}
{% if wei.adresse %}<p>{{wei.adresse}}</p>{% endif %}
{% if wei.mail %}<p>{{wei.mail}}</p>{% endif %}
{% if wei.ml_evenements %}<p>{{wei.ml_evenements}}</p>{% endif %}
{% if wei.normalien %}<p>{{wei.normalien}}</p>{% endif %}
{% if wei.tel %}<p>{{wei.tel}}</p>{% endif %}
{% if wei.urgence_nom %}<p>{{wei.urgence_nom}}</p>{% endif %}
{% if wei.urgence_tel %}<p>{{wei.urgence_tel}}</p>{% endif %}
{% if wei.dept %}<p>{{wei.dept}}</p>{% endif %}
{% if wei.note %}<p>{{wei.note}}</p>{% endif %}
{% if wei.infos %}<p>{{wei.infos}}</p>{% endif %}
{% if wei.soge %}<p>{{wei.soge}}</p>{% endif %}
{% if wei.quest %}<p>{{wei.quest}}</p>{% endif %}
{% if old %} {{ old }} {% endif %}
{% if wei %} {{ wei }} {% endif %}
{% if quest %} {{ quest }} {% endif %}
{% endif %}
<h1>{% trans "Questionnaire d'ambiance" %}</h1>
......
......@@ -1611,7 +1611,7 @@ def WEI1A(request, sock, kwargs):
# Remets à zéro les réponses du nouveau formulaire
request.session["wei1A2019"] = {}
request.session["wei1A2019"]["quest"] = ""
request.session["quest"] = ""
# On récupère les paramètres habituels de l'appli WEI
sock.write(json.dumps(["wei_main", ]))
......@@ -1686,7 +1686,7 @@ def WEI1Aalgo(request, sock, kwargs):
variables = {}
variables["old"] = request.session["wei1A2019"].copy()
res = request.session["wei1A2019"]["quest"]
res = request.session["quest"]
variables["liste"] = algo1a.test(True, [] if res == '' else res.split("#"), 1)
# On récupère les paramètres habituels de l'appli WEI
......@@ -1714,8 +1714,8 @@ def WEI1Aalgo(request, sock, kwargs):
variables["type"] = '1a'
elif request.method == "POST":
separator = "#" if request.session["wei1A2019"]["quest"] != "" else ""
request.session["wei1A2019"]["quest"] += separator + request.POST.get("reponse")
separator = "#" if request.session["quest"] != "" else ""
request.session["quest"] += separator + request.POST.get("reponse")
variables["wei"] = request.session["wei1A2019"].copy() # DEBUG
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment