add request context_processor and printing serving hostname to footer

eventually this will make lead to making it a bit more docker/kubernetes friendly
This commit is contained in:
Jeffrey Forman 2017-03-25 15:53:09 -04:00
parent 5e1b23ee67
commit ff8088defa
3 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,6 @@ from django.contrib.messages import constants as messages
SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
DEBUG = True DEBUG = True
ADMINS = ( ADMINS = (
# ('Your Name', 'your_email@domain.com'), # ('Your Name', 'your_email@domain.com'),
) )
@ -63,6 +62,7 @@ TEMPLATES = [
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.core.context_processors.request',
'django.template.context_processors.debug', 'django.template.context_processors.debug',
'django.template.context_processors.i18n', 'django.template.context_processors.i18n',
'django.template.context_processors.media', 'django.template.context_processors.media',

View File

@ -53,6 +53,7 @@
</ul> </ul>
{% endif %} {% endif %}
{% block body %}{% endblock body %} {% block body %}{% endblock body %}
Served by: {{ request.META.SERVER_NAME }}
</div> </div>
</div> </div>
</div> </div>

View File

@ -40,6 +40,7 @@
</div> </div>
</div> </div>
</form> </form>
Served by: {{ request.META.SERVER_NAME }}
</div> </div>
</body> </body>
</html> </html>