diff options
| author | Aymeric Augustin | 2013-10-18 22:32:03 +0200 |
|---|---|---|
| committer | Aymeric Augustin | 2013-10-18 22:32:03 +0200 |
| commit | d3d5b492543ed0fa42914152178df88b59496fe7 (patch) | |
| tree | 06d358ed78626b852ba4cd925e5f085b6b04f0f1 | |
| parent | fbd16d85245184f40f869026cedc4e0440dde17b (diff) | |
| download | django-debug-toolbar-d3d5b492543ed0fa42914152178df88b59496fe7.tar.bz2 | |
Disable redirects interception by default.
In general it's more annoying than useful.
| -rw-r--r-- | README.rst | 11 | ||||
| -rw-r--r-- | debug_toolbar/toolbar/loader.py | 2 |
2 files changed, 6 insertions, 7 deletions
@@ -129,11 +129,10 @@ The debug toolbar has two settings that can be set in ``settings.py``: * ``INTERCEPT_REDIRECTS`` - If set to True (default), the debug toolbar will - show an intermediate page upon redirect so you can view any debug - information prior to redirecting. This page will provide a link to the - redirect destination you can follow when ready. If set to False, redirects - will proceed as normal. + If set to True, the debug toolbar will show an intermediate page upon + redirect so you can view any debug information prior to redirecting. This + page will provide a link to the redirect destination you can follow when + ready. If set to False (default), redirects will proceed as normal. * ``SHOW_TOOLBAR_CALLBACK`` @@ -178,7 +177,7 @@ The debug toolbar has two settings that can be set in ``settings.py``: return True # Always show toolbar, for example purposes only. DEBUG_TOOLBAR_CONFIG = { - 'INTERCEPT_REDIRECTS': False, + 'INTERCEPT_REDIRECTS': True, 'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar, 'EXTRA_SIGNALS': ['myproject.signals.MySignal'], 'HIDE_DJANGO_SQL': False, diff --git a/debug_toolbar/toolbar/loader.py b/debug_toolbar/toolbar/loader.py index ee1de67..5b55149 100644 --- a/debug_toolbar/toolbar/loader.py +++ b/debug_toolbar/toolbar/loader.py @@ -17,7 +17,7 @@ class DebugToolbar(object): self._panels = SortedDict() base_url = self.request.META.get('SCRIPT_NAME', '') self.config = { - 'INTERCEPT_REDIRECTS': True, + 'INTERCEPT_REDIRECTS': False, 'MEDIA_URL': '%s/__debug__/m/' % base_url } # Check if settings has a DEBUG_TOOLBAR_CONFIG and updated config |
