aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility
diff options
context:
space:
mode:
authorLei Yan2014-07-14 16:23:12 +0000
committerLei Yan2014-07-14 17:02:01 +0000
commit214bf0128b8ecdda718983c5563cf34160743758 (patch)
tree917e7a5ae78dc4ff65dc08d107a0e3ae3a47c67c /wqflask/utility
parent8de6fec18cd98a10c58702c448a1e01e147dc5f7 (diff)
parentfbdbf4b7410185e2a978ecc8e120ae56ff6da0ce (diff)
downloadgenenetwork2-214bf0128b8ecdda718983c5563cf34160743758.tar.gz
Merge /home/zas1024/gene
Conflicts: wqflask/wqflask/static/new/javascript/dataset_select_menu.js wqflask/wqflask/templates/corr_scatter_plot_old.html
Diffstat (limited to 'wqflask/utility')
-rwxr-xr-xwqflask/utility/after.py22
-rwxr-xr-x[-rw-r--r--]wqflask/utility/benchmark.py0
-rwxr-xr-x[-rw-r--r--]wqflask/utility/corr_result_helpers.py0
-rwxr-xr-x[-rw-r--r--]wqflask/utility/db_tools.py0
-rwxr-xr-x[-rw-r--r--]wqflask/utility/formatting.py0
-rwxr-xr-x[-rw-r--r--]wqflask/utility/helper_functions.py0
-rwxr-xr-x[-rw-r--r--]wqflask/utility/temp_data.py0
7 files changed, 22 insertions, 0 deletions
diff --git a/wqflask/utility/after.py b/wqflask/utility/after.py
new file mode 100755
index 00000000..a3bb85e9
--- /dev/null
+++ b/wqflask/utility/after.py
@@ -0,0 +1,22 @@
+from __future__ import print_function, division, absolute_import
+
+"""
+See: http://flask.pocoo.org/docs/patterns/deferredcallbacks/#deferred-callbacks
+
+"""
+
+from flask import g
+
+from wqflask import app
+
+def after_this_request(f):
+ if not hasattr(g, 'after_request_callbacks'):
+ g.after_request_callbacks = []
+ g.after_request_callbacks.append(f)
+ return f
+
+@app.after_request
+def call_after_request_callbacks(response):
+ for callback in getattr(g, 'after_request_callbacks', ()):
+ callback(response)
+ return response
diff --git a/wqflask/utility/benchmark.py b/wqflask/utility/benchmark.py
index 182187ae..182187ae 100644..100755
--- a/wqflask/utility/benchmark.py
+++ b/wqflask/utility/benchmark.py
diff --git a/wqflask/utility/corr_result_helpers.py b/wqflask/utility/corr_result_helpers.py
index a253026c..a253026c 100644..100755
--- a/wqflask/utility/corr_result_helpers.py
+++ b/wqflask/utility/corr_result_helpers.py
diff --git a/wqflask/utility/db_tools.py b/wqflask/utility/db_tools.py
index 4034f39c..4034f39c 100644..100755
--- a/wqflask/utility/db_tools.py
+++ b/wqflask/utility/db_tools.py
diff --git a/wqflask/utility/formatting.py b/wqflask/utility/formatting.py
index e53dda22..e53dda22 100644..100755
--- a/wqflask/utility/formatting.py
+++ b/wqflask/utility/formatting.py
diff --git a/wqflask/utility/helper_functions.py b/wqflask/utility/helper_functions.py
index 44f5321e..44f5321e 100644..100755
--- a/wqflask/utility/helper_functions.py
+++ b/wqflask/utility/helper_functions.py
diff --git a/wqflask/utility/temp_data.py b/wqflask/utility/temp_data.py
index 004d45c6..004d45c6 100644..100755
--- a/wqflask/utility/temp_data.py
+++ b/wqflask/utility/temp_data.py