Add appversion app for displaying the version running on a server
This commit is contained in:
0
appversion/__init__.py
Normal file
0
appversion/__init__.py
Normal file
5
appversion/context.py
Normal file
5
appversion/context.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import subprocess
|
||||
|
||||
def git_version(request):
|
||||
version = subprocess.check_output(["git", "describe"])
|
||||
return {"app_version": version}
|
@@ -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'
|
||||
|
@@ -77,7 +77,8 @@
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
<div id="footer">
|
||||
©2012 Team Caminus. All Rights Reserved.
|
||||
<p>©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>
|
||||
|
Reference in New Issue
Block a user