about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSam Ockman2012-08-13 18:45:31 -0400
committerSam Ockman2012-08-13 18:45:31 -0400
commitc19117809b845849d1f7962b19eb16aa529c5975 (patch)
treea9a0a7503737f7e41e21885f769886f91446b726
parent8c7a90ac6aef00d4ed64ed1789cf4722a8465a8e (diff)
downloadgenenetwork2-c19117809b845849d1f7962b19eb16aa529c5975.tar.gz
news is now working
-rw-r--r--wqflask/wqflask/templates/whats_new.html6
-rw-r--r--wqflask/wqflask/views.py10
-rw-r--r--wqflask/wqflask/yaml_data/whats_new.yaml26
3 files changed, 40 insertions, 2 deletions
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 @@
                 <P class="title">Latest Updates and News from Genenetwork  <A HREF="/webqtl/main.py?FormID=editHtml"><img src="/images/modify.gif" alt="modify this page" border= 0 valign="middle"></A></P>
 
 
-            This is where we will keep what's new
+                {% for news_item in news_items %}
+                    <h4>{{ news_item.title }} ({{ news_item.date }})</h4>
+                    {{ news_item.details | safe }}
+                    <br /><br />
+                {% endfor %}
 
             <p />
 
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
+        (<a href="http://auwerx-lab.epfl.ch/">LISP</a>).
+        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