diff options
author | Pjotr Prins | 2016-10-11 12:19:01 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-10-11 12:19:01 +0000 |
commit | bf47de632fa787ea1c64005d44d73f6e47f5f474 (patch) | |
tree | 4916a3760dba4cf75310a2d3b701f482da4b08bd | |
parent | ccfe1f2e1afac31de9d1b2f34ad66ed77a517202 (diff) | |
parent | 1a8aa3fced3dd3870f2d5fc1f5c8a5b8c7756634 (diff) | |
download | genenetwork2-bf47de632fa787ea1c64005d44d73f6e47f5f474.tar.gz |
Merge branch 'pjotr-gn2' into testing
-rw-r--r-- | etc/default_settings.py | 4 | ||||
-rw-r--r-- | wqflask/utility/tools.py | 2 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/index_page_orig.html | 39 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 4 |
4 files changed, 47 insertions, 2 deletions
diff --git a/etc/default_settings.py b/etc/default_settings.py index db645f8b..6acea637 100644 --- a/etc/default_settings.py +++ b/etc/default_settings.py @@ -51,6 +51,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/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(): |