Bela Hausmann  committed b51ee71

Display current revision details on about page

  • Participants
  • Parent commits ef9d9c0

Comments (0)

Files changed (2)

File profile/

 # -*- coding: utf-8
+from subprocess import Popen, PIPE
 from django.utils.translation import ugettext as _
 from django.utils.simplejson.encoder import JSONEncoder
 from django.shortcuts import render_to_response,get_object_or_404
     profile_count = Profile.objects.count()
+    revision = dict()
+    revision['i'] = Popen(['hg', 'identify', '-i'], stdout = PIPE).communicate()[0].strip()
+    revision['n'] = Popen(['hg', 'identify', '-n'], stdout = PIPE).communicate()[0].strip()
     return render_to_response('about.html',
+                'revision': revision,

File templates/about.html

     <li>{% blocktrans %}This website is made using the <a href="" rel="external">Django</a> framework and the Django <em>gis</em> extensions.{% endblocktrans %}</li>
     <li>{% blocktrans %}Many thanks to the Official BETA tester and general 'Why doesn't this Work?!' guy <a href="">Homunculus</a>.{% endblocktrans %}</li>
     <li>{% trans "If you need to contact us, email us at " %}<a href=""></a>.</li>
+    <li>{% trans "Powered by " %} <a href="">genmap</a> (<code>r{{ revision.n }}:{{ revision.i }}</code>)</li>
 {% endblock %}