diff --git a/appversion/context.py b/appversion/context.py index 4599bac..baf10bd 100644 --- a/appversion/context.py +++ b/appversion/context.py @@ -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()} diff --git a/settings.py b/settings.py index c5ab0c8..2067023 100644 --- a/settings.py +++ b/settings.py @@ -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", ) diff --git a/templates/base_full.html b/templates/base_full.html index 5537bed..0c35d2d 100644 --- a/templates/base_full.html +++ b/templates/base_full.html @@ -161,7 +161,8 @@ s.parentNode.insertBefore(po, s);