diff options
author | BonfaceKilz | 2021-07-09 13:42:22 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-07-12 09:02:16 +0300 |
commit | ffa34cc70ad70ab39682e8bdda6b6eb0d46a577d (patch) | |
tree | 9d14f604cfad06ca574d6b79ce84adf6bf4976f0 /wqflask | |
parent | af6b141ac37dbc38f990a871e61127d1efde10ce (diff) | |
download | genenetwork2-ffa34cc70ad70ab39682e8bdda6b6eb0d46a577d.tar.gz |
wqflask: views: Add extra route showing probeset editing form
* wqflask/wqflask/views.py (edit_probeset): New function/ route.
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/views.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 595a0de7..e1f6dd71 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -34,8 +34,10 @@ from gn3.db import insert from gn3.db import update from gn3.db.metadata_audit import MetadataAudit from gn3.db.phenotypes import Phenotype +from gn3.db.phenotypes import Probeset from gn3.db.phenotypes import Publication from gn3.db.phenotypes import PublishXRef +from gn3.db.phenotypes import probeset_mapping from flask import current_app @@ -485,6 +487,23 @@ def edit_phenotype(name, inbred_set_id): ) +@app.route("/trait/edit/probeset-name/<dataset_name>") +@admin_login_required +def edit_probeset(dataset_name): + conn = MySQLdb.Connect(db=current_app.config.get("DB_NAME"), + user=current_app.config.get("DB_USER"), + passwd=current_app.config.get("DB_PASS"), + host=current_app.config.get("DB_HOST")) + probeset_ = fetchone(conn=conn, + table="ProbeSet", + columns=list(probeset_mapping.values()), + where=Probeset(name=dataset_name)) + return render_template( + "edit_probeset.html", + probeset=probeset_ + ) + + @app.route("/trait/update", methods=["POST"]) def update_phenotype(): conn = MySQLdb.Connect(db=current_app.config.get("DB_NAME"), |