0001-use-template-inclusion-to-enable-debug-toolbar-37920.patch
roles/app-setup/templates/app-settings-base.j2 | ||
---|---|---|
45 | 45 | |
46 | 46 |
DEBUG = True |
47 | 47 | |
48 |
if PROJECT_NAME in ['authentic', 'combo', 'passerelle']: |
|
49 |
try: |
|
50 |
import debug_toolbar |
|
51 |
except ImportError: |
|
52 |
import sys |
|
53 |
print "Missing debug toolbar" |
|
54 |
sys.exit(1) |
|
55 | ||
56 |
if vars().get('MIDDLEWARE'): |
|
57 |
MIDDLEWARE= ['debug_toolbar.middleware.DebugToolbarMiddleware'] + MIDDLEWARE |
|
58 |
else: |
|
59 |
MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES |
|
60 |
INSTALLED_APPS += ('debug_toolbar',) |
|
61 |
INTERNAL_IPS = ['127.0.0.1'] |
|
62 | ||
63 | 48 |
{% block app_custom_after %}{% endblock %} |
64 | 49 | |
65 | 50 |
for filename in sorted( |
roles/app-setup/templates/combo-settings.j2 | ||
---|---|---|
5 | 5 |
INSTALLED_APPS = ('hobo.agent.combo', ) + INSTALLED_APPS |
6 | 6 |
# add statics_hash context processor |
7 | 7 |
TEMPLATES[0]['OPTIONS']['context_processors'].append('hobo.context_processors.statics_hash') |
8 |
{% include 'middleware_class_debug_toolbar.j2' %} |
|
8 | 9 |
{% endblock %} |
roles/app-setup/templates/middleware_class_debug_toolbar.j2 | ||
---|---|---|
1 |
MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES |
|
2 |
INSTALLED_APPS += ('debug_toolbar',) |
|
3 |
INTERNAL_IPS = ['127.0.0.1'] |
roles/app-setup/templates/middleware_debug_toolbar.j2 | ||
---|---|---|
1 |
MIDDLEWARE = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE |
|
2 |
INSTALLED_APPS += ('debug_toolbar',) |
|
3 |
INTERNAL_IPS = ['127.0.0.1'] |
roles/app-setup/templates/passerelle-settings.j2 | ||
---|---|---|
3 | 3 |
{% block app_custom_after %} |
4 | 4 |
# disable django-mellon autologin |
5 | 5 |
MELLON_OPENED_SESSION_COOKIE_NAME = None |
6 |
{% include 'middleware_debug_toolbar.j2' %} |
|
6 | 7 |
{% endblock %} |
7 |
- |