From 03fd1cc81c02a5462aeb4dbce0bfe8a2afdef43d Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 24 Nov 2013 11:38:43 +0100 Subject: Remove HIDE_DJANGO_SQL configuration option. It was badly named and HIDE_IN_STACKTRACES provides a more general solution. The ability to show code in django.contrib but not in django doesn't seem particularly useful. Fix #474. --- debug_toolbar/settings.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'debug_toolbar/settings.py') diff --git a/debug_toolbar/settings.py b/debug_toolbar/settings.py index 6d21c34..5a58b6b 100644 --- a/debug_toolbar/settings.py +++ b/debug_toolbar/settings.py @@ -24,12 +24,12 @@ CONFIG_DEFAULTS = { # Panel options 'EXTRA_SIGNALS': [], 'ENABLE_STACKTRACES': True, - 'HIDE_DJANGO_SQL': True, 'HIDE_IN_STACKTRACES': ( 'socketserver' if six.PY3 else 'SocketServer', 'threading', 'wsgiref', 'debug_toolbar', + 'django', ), 'INTERCEPT_REDIRECTS': False, 'SHOW_TEMPLATE_CONTEXT': True, @@ -50,11 +50,16 @@ for old_name, new_name in _RENAMED_CONFIG.items(): "%r was renamed to %r. Update your DEBUG_TOOLBAR_CONFIG " "setting." % (old_name, new_name), DeprecationWarning) USER_CONFIG[new_name] = USER_CONFIG.pop(old_name) +if 'HIDE_DJANGO_SQL' in USER_CONFIG: + warnings.warn( + "HIDE_DJANGO_SQL was removed. Update your " + "DEBUG_TOOLBAR_CONFIG setting.", DeprecationWarning) + USER_CONFIG.pop('HIDE_DJANGO_SQL') if 'TAG' in USER_CONFIG: - warnings.warn( + warnings.warn( "TAG was replaced by INSERT_BEFORE. Update your " "DEBUG_TOOLBAR_CONFIG setting.", DeprecationWarning) - USER_CONFIG['INSERT_BEFORE'] = '' % USER_CONFIG.pop('TAG') + USER_CONFIG['INSERT_BEFORE'] = '' % USER_CONFIG.pop('TAG') CONFIG.update(USER_CONFIG) -- cgit v1.2.3