diff options
author | zsloan | 2022-08-01 16:26:24 +0000 |
---|---|---|
committer | zsloan | 2022-08-01 17:01:55 +0000 |
commit | 89d8aa2635d7208f4fee38db32322f28cedcd9a7 (patch) | |
tree | a8c4ec19d885fb6a7a3970461322c2de6694e661 /wqflask | |
parent | 6ee65d6480685bc00ce734f7678dc8f2129f2575 (diff) | |
download | genenetwork2-89d8aa2635d7208f4fee38db32322f28cedcd9a7.tar.gz |
Add date/time to trait page export
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/show_trait/export_trait_data.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wqflask/wqflask/show_trait/export_trait_data.py b/wqflask/wqflask/show_trait/export_trait_data.py index ae83907e..6660ce4e 100644 --- a/wqflask/wqflask/show_trait/export_trait_data.py +++ b/wqflask/wqflask/show_trait/export_trait_data.py @@ -1,3 +1,4 @@ +import datetime import simplejson as json from pprint import pformat as pf @@ -5,7 +6,6 @@ from functools import cmp_to_key from base.trait import create_trait from base import data_set - def export_sample_table(targs): sample_data = json.loads(targs['export_data']) @@ -63,6 +63,7 @@ def get_export_metadata(trait_metadata): ["Title: ", (this_trait.title if this_trait.title else "N/A")]) metadata.append( ["Journal: ", (this_trait.journal if this_trait.journal else "N/A")]) + metadata.append( ["Dataset Link: ", "http://gn1.genenetwork.org/webqtl/main.py?FormID=sharinginfo&InfoPageName=" + dataset.name]) else: @@ -73,6 +74,10 @@ def get_export_metadata(trait_metadata): metadata.append(["Symbol: ", this_trait.symbol]) metadata.append(["Dataset: ", dataset.name]) metadata.append(["Group: ", dataset.group.name]) + metadata.append( + ["Export Date: ", datetime.datetime.now().strftime("%B %d, %Y")]) + metadata.append( + ["Export Time: ", datetime.datetime.now().strftime("%H:%M GMT")]) metadata.append([]) |