From c710140a15222af2cf31b7579c6a5fedf9a482d5 Mon Sep 17 00:00:00 2001 From: Paulo Scardine Date: Thu, 23 May 2013 22:50:33 -0300 Subject: Allow setting arbitrary attributes on the toolbar. Fix #334. --- debug_toolbar/toolbar/loader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debug_toolbar/toolbar') diff --git a/debug_toolbar/toolbar/loader.py b/debug_toolbar/toolbar/loader.py index 5b55149..491f66c 100644 --- a/debug_toolbar/toolbar/loader.py +++ b/debug_toolbar/toolbar/loader.py @@ -18,7 +18,8 @@ class DebugToolbar(object): base_url = self.request.META.get('SCRIPT_NAME', '') self.config = { 'INTERCEPT_REDIRECTS': False, - 'MEDIA_URL': '%s/__debug__/m/' % base_url + 'MEDIA_URL': '%s/__debug__/m/' % base_url, + 'ROOT_TAG_ATTRS': '', } # Check if settings has a DEBUG_TOOLBAR_CONFIG and updated config self.config.update(getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {})) @@ -26,6 +27,7 @@ class DebugToolbar(object): 'BASE_URL': base_url, # for backwards compatibility 'DEBUG_TOOLBAR_MEDIA_URL': self.config.get('MEDIA_URL'), 'STATIC_URL': settings.STATIC_URL, + 'TOOLBAR_ROOT_TAG_ATTRS': self.config.get('ROOT_TAG_ATTRS'), } self.load_panels() -- cgit v1.2.3