Add INTERNAL_IPS to development settings and check the debug varibale in templates.

This commit is contained in:
Christopher Charbonneau Wells 2017-08-24 07:36:11 -04:00
parent ed96814b10
commit dd6eb954c3
2 changed files with 20 additions and 4 deletions

View File

@ -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 = ['*']

View File

@ -7,16 +7,27 @@
<meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{% block title %}{% endblock %} | Baby Blotter</title>
<link rel="stylesheet" href="{% static "babyblotter/css/app.css" %}" />
<link rel="stylesheet" href="{% static "babyblotter/css/vendor.css" %}" />
{% if debug %}
<link rel="stylesheet" href="{% static "babyblotter/css/app.css" %}" />
<link rel="stylesheet" href="{% static "babyblotter/css/vendor.css" %}" />
{% else %}
<link rel="stylesheet" href="{% static "babyblotter/css/app.min.css" %}" />
<link rel="stylesheet" href="{% static "babyblotter/css/vendor.min.css" %}" />
{% endif %}
</head>
<body style="padding-top: 5rem;">
{% block nav %}{% endblock %}
{% block page %}{% endblock %}
<script src="{% static "babyblotter/js/vendor.js" %}"></script>
<script src="{% static "babyblotter/js/app.js" %}"></script>
{% if debug %}
<script src="{% static "babyblotter/js/vendor.js" %}"></script>
<script src="{% static "babyblotter/js/app.js" %}"></script>
{% else %}
<script src="{% static "babyblotter/js/vendor.min.js" %}"></script>
<script src="{% static "babyblotter/js/app.min.js" %}"></script>
{% endif %}
{% block javascript %}{% endblock %}
</body>
</html>