Display hostname on pages

This commit is contained in:
Trever Fischer
2012-10-22 12:37:48 -04:00
parent eec4b8e989
commit c5d644371d
3 changed files with 7 additions and 1 deletions

View File

@@ -1,4 +1,8 @@
from appversion import version
import platform
def git_version(request):
return {"app_version": version()}
def server_hostname(request):
return {'server_hostname': platform.node()}

View File

@@ -179,6 +179,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
"local.context.javascript_uris",
"minecraft.context.server_info",
"appversion.context.git_version",
"appversion.context.server_hostname",
"messages.context_processors.inbox",
"petition.context.open_petitions",
)

View File

@@ -161,7 +161,8 @@ s.parentNode.insertBefore(po, s);
<div class="grid_12">
<div id="footer">
<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>
<p><a
href="http://github.com/tdfischer/caminus/commit/{{app_version}}">Running {{app_version}}</a> on {{server_hostname}}</p>
<p><div class="g-plus" data-href="https://plus.google.com/114314721632174286634?rel=publisher" data-width="300" data-height="131" data-theme="dark"></div></p>
</div>
</div>