Commit b84d37a9 authored by Hamza Dely's avatar Hamza Dely

get_boutons accepte simultanément terme de recherche, catégorie et flags

parent 36c9d0a9
......@@ -121,13 +121,14 @@ def get_boutons(request, flags=""):
return HttpResponse("Get the fuck out of here", status=444)
else:
try:
asked = request.POST["asked"]
asked = request.POST.get("asked", "")
categorie = request.POST.get("categorie", "")
except:
return HttpResponse("HTTP/1.1 Bad Request", status=400)
success, sock_ou_response = nk.socket_still_alive(request)
if success:
sock = sock_ou_response
data = [asked, "", flags]
data = [asked, categorie, flags]
sock.write(json.dumps(["get_boutons", data]))
out = nk.full_read(sock)["msg"]
return HttpResponse(json.dumps(out))
......
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