aboutsummaryrefslogtreecommitdiff
path: root/uploader/phenotypes/views.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-03-21 14:12:32 -0500
committerFrederick Muriuki Muriithi2025-03-21 14:12:32 -0500
commit19f24ba8cd4b574c58f84b3cad1a78ebd18f5cdb (patch)
tree0ca7d5bcabb0654999ecf95ce14e93f6f401f3b2 /uploader/phenotypes/views.py
parentc281820ea0ccb8c078c83deca128010b3df95dce (diff)
downloadgn-uploader-19f24ba8cd4b574c58f84b3cad1a78ebd18f5cdb.tar.gz
Bulk Edit: Initialise the bulk-edit upload
* Provide UI for uploading the file * Provide (partially implemented) endpoint to handle the uploaded file.
Diffstat (limited to 'uploader/phenotypes/views.py')
-rw-r--r--uploader/phenotypes/views.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py
index 2f6e926..3d2ff76 100644
--- a/uploader/phenotypes/views.py
+++ b/uploader/phenotypes/views.py
@@ -932,3 +932,29 @@ def edit_download_phenotype_data(# pylint: disable=[unused-argument]
mimetype="text/csv",
as_attachment=True,
download_name=secure_filename(f"{dataset['Name']}_data"))
+
+
+@phenotypesbp.route(
+ "<int:species_id>/populations/<int:population_id>/phenotypes/datasets"
+ "/<int:dataset_id>/edit-upload",
+ methods=["GET", "POST"])
+@require_login
+@with_dataset(
+ species_redirect_uri="species.populations.phenotypes.index",
+ population_redirect_uri="species.populations.phenotypes.select_population",
+ redirect_uri="species.populations.phenotypes.list_datasets")
+def edit_upload_phenotype_data(# pylint: disable=[unused-argument]
+ species: dict,
+ population: dict,
+ dataset: dict,
+ **kwargs
+):
+ if request.method == "GET":
+ return render_template(
+ "phenotypes/bulk-edit-upload.html",
+ species=species,
+ population=population,
+ dataset=dataset,
+ activelink="edit-phenotype")
+
+ return "NOT Implemented: Would do actual edit."