Permalink
Browse files

context processor to display django version in footer

  • Loading branch information...
1 parent 98ead09 commit be1127d22c153352ed9945b04b2c5bfaabd82b63 @hypertexthero committed Jun 21, 2011
Showing with 5 additions and 1 deletion.
  1. +4 −0 context_processors.py
  2. +1 −1 templates/base.html
View
@@ -0,0 +1,4 @@
+# http://stackoverflow.com/questions/4256145/django-template-tag-to-display-django-version/6423192#6423192
+import django
+def django_version(request):
+ return { 'django_version': django.VERSION }
View
@@ -30,7 +30,7 @@
{% block footer %}
<p id="footer">
- This has been <a href="http://hypertexthero.com" title="Hypertexthero.com">Simon Griffee</a>, experimenting with Django.<br />
+ This has been <a href="http://hypertexthero.com" title="Hypertexthero.com">Simon Griffee</a>, experimenting with Django {{ django_version }}.<br />
It is currently {% now "H:i T" %} on the {% now "jS" %} of {% now "F Y" %}.
</p>
{% endblock %}

0 comments on commit be1127d

Please sign in to comment.