aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2016-10-09 11:43:55 +0000
committerPjotr Prins2016-10-09 11:43:55 +0000
commitccfe1f2e1afac31de9d1b2f34ad66ed77a517202 (patch)
treedf74e8bb6b9a4ed5e42a9b592b20827e4d4cd5cc /wqflask
parent6e1e943323a101cf6c2980ae62d8329e1ab77d96 (diff)
downloadgenenetwork2-ccfe1f2e1afac31de9d1b2f34ad66ed77a517202.tar.gz
Handle VERSION on different pages
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/templates/base.html2
-rw-r--r--wqflask/wqflask/templates/error.html4
-rw-r--r--wqflask/wqflask/views.py2
3 files changed, 5 insertions, 3 deletions
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html
index cf40fe3c..210c5708 100644
--- a/wqflask/wqflask/templates/base.html
+++ b/wqflask/wqflask/templates/base.html
@@ -143,7 +143,9 @@
<!--</p>-->
<p>
Development and source code on <a href="https://github.com/genenetwork/">github</a> with <a href="https://github.com/genenetwork/genenetwork2/issues">issue tracker</a> and <a href="https://github.com/genenetwork/genenetwork2/blob/master/README.md">documentation</a>. Join the <a href="http://listserv.uthsc.edu/mailman/listinfo/genenetwork-dev">mailing list</a> and find us on <a href="https://webchat.freenode.net/">IRC</a> (#genenetwork channel).
+ {% if version: %}
<p><small>GeneNetwork v{{ version }}</small></p>
+ {% endif %}
</div>
</footer>
diff --git a/wqflask/wqflask/templates/error.html b/wqflask/wqflask/templates/error.html
index 7ab2bf2f..c707a4fc 100644
--- a/wqflask/wqflask/templates/error.html
+++ b/wqflask/wqflask/templates/error.html
@@ -35,7 +35,7 @@
</p>
<pre>
- {{ stack[0] }}
+ GeneNetwork v{{ version }} {{ stack[0] }}
{{ message }} (error)
{{ stack[-3] }}
{{ stack[-2] }}
@@ -50,7 +50,7 @@
<a href="#Stack" class="btn btn-default" data-toggle="collapse">Toggle full stack trace</a>
<div id="Stack" class="collapse">
<pre>
- {% for line in stack %} {{ line }}
+ GeneNetwork v{{ version }} {% for line in stack %} {{ line }}
{% endfor %}
</pre>
</div>
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 5528d375..8fbbd2d8 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -108,7 +108,7 @@ def handle_bad_request(e):
list = [fn for fn in os.listdir("./wqflask/static/gif/error") if fn.endswith(".gif") ]
animation = random.choice(list)
- resp = make_response(render_template("error.html",message=err_msg,stack=formatted_lines,error_image=animation))
+ resp = make_response(render_template("error.html",message=err_msg,stack=formatted_lines,error_image=animation,version=GN_VERSION))
# logger.error("Set cookie %s with %s" % (err_msg, animation))
resp.set_cookie(err_msg[:32],animation)