diff options
-rw-r--r-- | etc/default_settings.py | 4 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/index_page_orig.html | 39 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 4 |
3 files changed, 45 insertions, 2 deletions
diff --git a/etc/default_settings.py b/etc/default_settings.py index d8e57f38..fb3670dd 100644 --- a/etc/default_settings.py +++ b/etc/default_settings.py @@ -50,6 +50,10 @@ LOG_BENCH = True # Log bench marks USE_REDIS = True # REDIS caching (note that redis will be phased out) USE_GN_SERVER = 'False' # Use GN_SERVER SQL calls +# Paths to JS libraries + +TWITTER_POST_FETCHER_JS_PATH = os.environ['HOME']+"/genenetwork/Twitter-Post-Fetcher" + # ---- Path overrides for Genenetwork # TMPDIR is normally picked up from the environment HOME=os.environ['HOME'] diff --git a/wqflask/wqflask/templates/index_page_orig.html b/wqflask/wqflask/templates/index_page_orig.html index 668a0b33..7b085573 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 33fab84d..a5b2870d 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(): |