Add appversion app for displaying the version running on a server

This commit is contained in:
Trever Fischer
2012-02-25 12:14:42 -05:00
parent 1bc8bb3419
commit a640368594
4 changed files with 9 additions and 2 deletions

0
appversion/__init__.py Normal file
View File

5
appversion/context.py Normal file
View File

@@ -0,0 +1,5 @@
import subprocess
def git_version(request):
version = subprocess.check_output(["git", "describe"])
return {"app_version": version}

View File

@@ -167,7 +167,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.messages.context_processors.messages",
"profiles.context.random_quote",
"profiles.context.login_form",
"minecraft.context.server_info"
"minecraft.context.server_info",
"appversion.context.git_version"
)
LOGIN_URL = '/profiles/login'

View File

@@ -77,7 +77,8 @@
</div>
<div class="grid_12">
<div id="footer">
&copy;2012 Team Caminus. All Rights Reserved.
<p>&copy;2012 Team Caminus. All Rights Reserved.</p>
<p><a href="http://github.com/tdfischer/caminus/commit/{{app_version}}">Running {{app_version}}</a></p>
</div>
</div>
</div>