From c19117809b845849d1f7962b19eb16aa529c5975 Mon Sep 17 00:00:00 2001 From: Sam Ockman Date: Mon, 13 Aug 2012 18:45:31 -0400 Subject: news is now working --- wqflask/wqflask/templates/whats_new.html | 6 +++++- wqflask/wqflask/views.py | 10 +++++++++- wqflask/wqflask/yaml_data/whats_new.yaml | 26 ++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 wqflask/wqflask/yaml_data/whats_new.yaml (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/whats_new.html b/wqflask/wqflask/templates/whats_new.html index 75a08dcd..dca9e7b3 100644 --- a/wqflask/wqflask/templates/whats_new.html +++ b/wqflask/wqflask/templates/whats_new.html @@ -12,7 +12,11 @@

Latest Updates and News from Genenetwork modify this page

- This is where we will keep what's new + {% for news_item in news_items %} +

{{ news_item.title }} ({{ news_item.date }})

+ {{ news_item.details | safe }} +

+ {% endfor %}

diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 34c78f54..2b6fa9b1 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -15,6 +15,8 @@ from base import webqtlFormData from pprint import pformat as pf +import yaml + print("latest blue") @app.route("/") @@ -55,7 +57,13 @@ def search(): @app.route("/whats_new") def whats_new(): #variables = whats_new.whats_new() - return render_template("whats_new.html") + with open("/home/sam/gene/wqflask/wqflask/yaml_data/whats_new.yaml") as fh: + contents = fh.read() + yamilized = yaml.safe_load(contents) + news_items = yamilized['news'] + for news_item in news_items: + print("\nnews_item is: %s\n" % (news_item)) + return render_template("whats_new.html", news_items=news_items) @app.route("/showDatabaseBXD") def showDatabaseBXD(): diff --git a/wqflask/wqflask/yaml_data/whats_new.yaml b/wqflask/wqflask/yaml_data/whats_new.yaml new file mode 100644 index 00000000..8f41a8f2 --- /dev/null +++ b/wqflask/wqflask/yaml_data/whats_new.yaml @@ -0,0 +1,26 @@ +news: +- + date: 2012-1-20 + title: Mouse SNPs from dbSNP have been added to GeneNetwork + details: + 10 million mouse SNPs from dbSNP (build 128) have been added to Variant Browser. + They could be searched by name (e.g. rs31192936) (Implemented by Xiaodong Zhou and Ning Liu). + +- + date: 2012-1-20 + title: Literature correlation has been update to 2011 version + details: + Dr. Ramin Homayouni and Dr. Lijing Xu kindly provide the 2011 version of mouse gene-gene + literature correlation matrix to GeneNetwork. (Implemented by Xiaodong Zhou). + +- + date: 2012-1-16 + title: Expression data set for EPFL/LISP BXD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA ** has been entered in GeneNetwork + details: + Laboratory of Integrative and Systems Physiology + (LISP). + This data set is not yet freely available for global analysis. + This data set has not yet been used or described in any publication. + Please contact Johan Auwerx or Evan Williams at evan.williams@epfl.ch + regarding use of these data. (Implemented by J Auwerx, E Williams, LA Rose, + RW Williams and A Centeno). \ No newline at end of file -- cgit v1.2.3