File tree 4 files changed +18
-0
lines changed
4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,14 @@ def customizable_strings(request):
9
9
"CLEARINGHOUSE_URL" : settings .CLEARINGHOUSE_URL ,
10
10
"DEMOKIT" : settings .DEMOKIT ,
11
11
}
12
+
13
+ def options (request ):
14
+ """Make variables defined in settings.py available to the template engine."""
15
+ from django .conf import settings
16
+ return {
17
+ # A debug variable is available to the templates via django's
18
+ # 'django.core.context_processors.debug', but only if the request's
19
+ # IP address is listed in the INTERNAL_IPS setting, c.f.:
20
+ # https://docs.djangoproject.com/en/1.9/ref/templates/api/#django-template-context-processors-debug
21
+ "DEBUG" : "settings.DEBUG" ,
22
+ }
Original file line number Diff line number Diff line change
1
+ < div class ="warning ">
2
+ WARNING: you are in DEBUG mode. Change settings.DEBUG to False in production!
3
+ </ div >
Original file line number Diff line number Diff line change 44
44
</ head >
45
45
46
46
< body >
47
+ {% if DEBUG %}
48
+ {% include "common/debug_warning.html" %}
49
+ {% endif %}
47
50
{% block header %}
48
51
< div id ="header ">
49
52
< span id ="logo "> < a href ="{% url 'profile' %} "> {{ TESTBED }} {{ CLEARINGHOUSE }}</ a > </ span >
Original file line number Diff line number Diff line change 258
258
'social_auth.context_processors.social_auth_by_type_backends' ,
259
259
# Add context processor for TESTBED etc. tags; configure these below.
260
260
'clearinghouse.website.context_processor.customizable_strings' ,
261
+ 'clearinghouse.website.context_processor.options' ,
261
262
)
262
263
# Social_auth follows each of these in order and passes along a object with
263
264
# information gathered to each function.
You can’t perform that action at this time.
0 commit comments