Permalink
Browse files

Add version to footer

  • Loading branch information...
1 parent 85bb69c commit feae4a42c9d1403ce6c622ee262932993acf8e2e @dcramer dcramer committed Oct 3, 2012
@@ -0,0 +1,5 @@
+try:
+ VERSION = __import__('pkg_resources') \
+ .get_distribution('zumanji').version
+except Exception, e:
+ VERSION = 'unknown'
@@ -1,4 +1,4 @@
-
+{% load zumanji_helpers %}
<!DOCTYPE html>
<html lang="en">
@@ -56,7 +56,7 @@
<footer id="footer">
<div class="container">
{% block footer %}
- <a href="https://github.com/disqus/zumanji">Zumanji</a> is Open Source Software | A tribute to <a href="http://twitter.com/zmanji">@zmanji</a>, the greatest <a href="http://code.disqus.com" style="text-decoration:line-through">DISQUS</a> intern ever.
+ Zumanji {% zumanji_version %} | <a href="https://github.com/disqus/zumanji">Zumanji</a> is Open Source Software | A tribute to <a href="http://twitter.com/zmanji">@zmanji</a>, the greatest <a href="http://code.disqus.com" style="text-decoration:line-through">DISQUS</a> intern ever.
{% endblock %}
</div>
</footer>
@@ -8,6 +8,12 @@
register = template.Library()
+@register.simple_tag
+def zumanji_version():
+ import zumanji
+ return zumanji.VERSION
+
+
@register.filter
def format_historical(data):
result = []

0 comments on commit feae4a4

Please sign in to comment.