From ff8088defac645f01e420762d8a190bcdff5f5e0 Mon Sep 17 00:00:00 2001 From: Jeffrey Forman Date: Sat, 25 Mar 2017 15:53:09 -0400 Subject: [PATCH] add request context_processor and printing serving hostname to footer eventually this will make lead to making it a bit more docker/kubernetes friendly --- binder/settings.py | 2 +- binder/templates/base.html | 1 + binder/templates/registration/login.html | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/binder/settings.py b/binder/settings.py index d07732c..500ed60 100644 --- a/binder/settings.py +++ b/binder/settings.py @@ -4,7 +4,6 @@ from django.contrib.messages import constants as messages SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) DEBUG = True - ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) @@ -63,6 +62,7 @@ TEMPLATES = [ 'OPTIONS': { 'context_processors': [ 'django.contrib.auth.context_processors.auth', + 'django.core.context_processors.request', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', diff --git a/binder/templates/base.html b/binder/templates/base.html index 4d191fa..7f64e63 100644 --- a/binder/templates/base.html +++ b/binder/templates/base.html @@ -53,6 +53,7 @@ {% endif %} {% block body %}{% endblock body %} + Served by: {{ request.META.SERVER_NAME }} diff --git a/binder/templates/registration/login.html b/binder/templates/registration/login.html index 4be699a..5592a8c 100644 --- a/binder/templates/registration/login.html +++ b/binder/templates/registration/login.html @@ -40,6 +40,7 @@ + Served by: {{ request.META.SERVER_NAME }}