Commit ea64ef9d authored by raida's avatar raida
Browse files

Test5

parent 671e5f13
......@@ -1684,8 +1684,10 @@ def WEI1Aalgo(request, sock, kwargs):
"""
variables = {}
variables["old"] = request.session["wei1A2019"]
variables["liste"] = algo1a.test(True, [] if request.session["wei1A2019"]["quest"] == '' else res.split("#"), 1)
variables["old"] = request.session["wei1A2019"].copy()
res = request.session["wei1A2019"]["quest"]
variables["liste"] = algo1a.test(True, [] if res == '' else res.split("#"), 1)
# On récupère les paramètres habituels de l'appli WEI
sock.write(json.dumps(["wei_main", ]))
......@@ -1714,7 +1716,7 @@ def WEI1Aalgo(request, sock, kwargs):
elif request.method == "POST":
separator = "#" if request.session["wei1A2019"]["quest"] != "" else ""
request.session["wei1A2019"]["quest"] += separator + request.POST.get("reponse")
variables["wei"] = request.session["wei1A2019"] # DEBUG
variables["wei"] = request.session["wei1A2019"].copy() # DEBUG
else:
messages.add_error(request, "Requête inattendue : {}".format(request.method))
......
Supports Markdown
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