From dd6eb954c3a5e8e238f4d7206892c1b0ea6beeee Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Thu, 24 Aug 2017 07:36:11 -0400 Subject: [PATCH] Add INTERNAL_IPS to development settings and check the debug varibale in templates. --- babyblotter/settings/development.py | 5 +++++ babyblotter/templates/babyblotter/base.html | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/babyblotter/settings/development.py b/babyblotter/settings/development.py index c6383c90..aa0a2323 100644 --- a/babyblotter/settings/development.py +++ b/babyblotter/settings/development.py @@ -5,6 +5,11 @@ from .base import * SECRET_KEY = '(z4ha%^_=7#jco0wmna_#0jvyyt!03#f7l_y%@1x(a2xj$nrx%' DEBUG = True +# Enables the debug template varaible. +INTERNAL_IPS = ( + '0.0.0.0', + '127.0.0.1', +) ALLOWED_HOSTS = ['*'] diff --git a/babyblotter/templates/babyblotter/base.html b/babyblotter/templates/babyblotter/base.html index 9b22106d..f21f49a9 100644 --- a/babyblotter/templates/babyblotter/base.html +++ b/babyblotter/templates/babyblotter/base.html @@ -7,16 +7,27 @@ {% block title %}{% endblock %} | Baby Blotter - - + {% if debug %} + + + {% else %} + + + {% endif %} {% block nav %}{% endblock %} {% block page %}{% endblock %} - - +{% if debug %} + + +{% else %} + + +{% endif %} + {% block javascript %}{% endblock %} \ No newline at end of file