aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/utility/tools.py2
-rwxr-xr-xwqflask/wqflask/templates/index_page_orig.html39
-rw-r--r--wqflask/wqflask/views.py4
3 files changed, 43 insertions, 2 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 90144962..df032e48 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -232,3 +232,5 @@ if os.environ.get('WQFLASK_OVERRIDES'):
else:
OVERRIDES[k] = cmd
logger.debug(OVERRIDES)
+
+assert_dir(get_setting("TWITTER_POST_FETCHER_JS_PATH"))
diff --git a/wqflask/wqflask/templates/index_page_orig.html b/wqflask/wqflask/templates/index_page_orig.html
index 9ac267f1..1694eae5 100755
--- a/wqflask/wqflask/templates/index_page_orig.html
+++ b/wqflask/wqflask/templates/index_page_orig.html
@@ -1,5 +1,10 @@
{% extends "base.html" %}
{% block title %}GeneNetwork{% endblock %}
+{% block css %}
+<style TYPE="text/css">
+ p.interact { display: none; }
+</style>
+{% endblock %}
{% block content %}
<!-- Start of body -->
@@ -166,8 +171,17 @@
</ul>
</section>
</div>
+
<div style="padding-left:120px" class="col-xs-4" style="width: 600px !important;">
- <!--
+ <section id="news-section">
+ <div class="page-header">
+ <h1>News</h1>
+ </div>
+ <div id="tweets"></div>
+ <div align="right">
+ <a href="https://twitter.com/GeneNetwork2">more news items...</a>
+ </div>
+ <!--
<section id="tour-info">
<div class="page-header">
<h1>Tour and more info</h1>
@@ -194,6 +208,7 @@
</section>
-->
+ </section>
<section id="websites">
<div class="page-header">
@@ -220,7 +235,10 @@
UTHSC</li>
</ul>
- </section>
+
+
+
+ </section>
<!--<section id="getting-started">
<div class="page-header">
@@ -281,4 +299,21 @@
}
</script>
+ <script type="text/javascript" src="/twitter/js/twitterFetcher_min.js"></script>
+
+ <script type="text/javascript">
+ var configProfile = {
+ "profile": {"screenName": 'GeneNetwork2'},
+ "domId": 'tweets',
+ "maxTweets": 5,
+ "enableLinks": true,
+ "showUser": false,
+ "showTime": true,
+ "showImages": false,
+ "lang": 'en'
+ };
+ twitterFetcher.fetch(configProfile);
+ </script>
+
+
{% endblock %}
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 8fbbd2d8..fb52165a 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -143,6 +143,10 @@ def tmp_page(img_path):
return render_template("show_image.html",
img_base64 = bytesarray )
+@app.route("/twitter/<path:filename>")
+def bd_files(filename):
+ bd_path = app.config['TWITTER_POST_FETCHER_JS_PATH']
+ return send_from_directory(bd_path, filename)
#@app.route("/data_sharing")
#def data_sharing_page():