aboutsummaryrefslogtreecommitdiff
path: root/uploader/phenotypes/views.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-12-13 15:09:48 -0600
committerFrederick Muriuki Muriithi2024-12-13 15:09:48 -0600
commitcebb41d8a13fd507272a91bb13e28bfa60a60996 (patch)
tree72b667a8c78c90cfec869da08bb4dbddc943f1ca /uploader/phenotypes/views.py
parent41b78a32c20df5c84d1b2910d8b84f301429f1d7 (diff)
downloadgn-uploader-cebb41d8a13fd507272a91bb13e28bfa60a60996.tar.gz
Use new templates:
Diffstat (limited to 'uploader/phenotypes/views.py')
-rw-r--r--uploader/phenotypes/views.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py
index 8a8ca42..c4aa67a 100644
--- a/uploader/phenotypes/views.py
+++ b/uploader/phenotypes/views.py
@@ -2,6 +2,7 @@
import sys
import uuid
import json
+import datetime
from pathlib import Path
from functools import wraps
from logging import INFO, ERROR, DEBUG, FATAL, CRITICAL, WARNING
@@ -329,11 +330,24 @@ def add_phenotypes(species: dict, population: dict, dataset: dict, **kwargs):# p
# conn.cursor(cursorclass=DictCursor) as cursor
):
if request.method == "GET":
- return render_template("phenotypes/add-phenotypes.html",
- species=species,
- population=population,
- dataset=dataset,
- activelink="add-phenotypes")
+ today = datetime.date.today()
+ return render_template(
+ ("phenotypes/add-phenotypes-with-rqtl2-bundle.html"
+ if request.args.get("use_bundle", "").lower() == "true"
+ else "phenotypes/add-phenotypes-raw-files.html"),
+ species=species,
+ population=population,
+ dataset=dataset,
+ monthnames=(
+ "January", "February", "March", "April",
+ "May", "June", "July", "August",
+ "September", "October", "November",
+ "December"),
+ current_month=today.strftime("%B"),
+ current_year=int(today.strftime("%Y")),
+ families_with_se_and_n=(
+ "Reference Populations (replicate average, SE, N)",),
+ activelink="add-phenotypes")
try:
## Handle huge files here...