aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2023-12-20 23:03:25 +0300
committerAlexander_Kabui2023-12-20 23:03:25 +0300
commitcbdbb90de86cf20d0265fd37e24e473af562c7c1 (patch)
tree228d14893677afe801d07650baf3487345c410cc
parent16ba1826095332b475e6ab4bbd4481204fae4401 (diff)
downloadgenenetwork2-cbdbb90de86cf20d0265fd37e24e473af562c7c1.tar.gz
add template handler for gngna
-rw-r--r--wqflask/wqflask/views.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 34574c10..ee4d6a59 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -262,6 +262,22 @@ def gsearchtable():
return flask.jsonify(current_page)
+
+@app.route("/gnqna",methods =["POST","GET"])
+def gnqna():
+ if request.method == "POST":
+ results = dict(request.form)
+ try:
+ response = requests.post("http://localhost:5000/gnqa",json=results)
+ if response.status_code ==200:
+ return render_template("gnqa_answer.html",**response.json())
+ return response.json()
+ except Exception as e:
+ return flask.jsonify({"error occurred":str(e)})
+
+ #return render_template("gnqa_answer.html")
+ return render_template("gnqa.html")
+
@app.route("/gsearch_updating", methods=('POST',))
def gsearch_updating():
result = UpdateGSearch(request.args).__dict__