aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Wahl2013-12-11 17:28:35 -0700
committerGavin Wahl2013-12-11 17:32:08 -0700
commitb21269532cbd23ab61f6c80951fae89b18675804 (patch)
tree0dd84285edf0732ca079f77453be733e79c0561d
parent7716a53bdd0dd2547056bad901253c1eedfb581a (diff)
downloaddjango-debug-toolbar-b21269532cbd23ab61f6c80951fae89b18675804.tar.bz2
Put debug_toolbar's url patterns first
Some applications require using a catch-all urlpattern that must come last in the list of urlpatterns. If the __debug__ urls come after it, they'll never be hit. Putting the debug_toolbar urls first fixes this, but could possibly shadow an existing url, but the old version of debug toolbar did the same thing.
-rw-r--r--debug_toolbar/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/debug_toolbar/models.py b/debug_toolbar/models.py
index c9a12d8..4e624fa 100644
--- a/debug_toolbar/models.py
+++ b/debug_toolbar/models.py
@@ -51,9 +51,9 @@ def patch_root_urlconf():
reverse('djdt:render_panel')
except NoReverseMatch:
urlconf_module = import_module(settings.ROOT_URLCONF)
- urlconf_module.urlpatterns += patterns('', # noqa
+ urlconf_module.urlpatterns = patterns('', # noqa
url(r'^__debug__/', include(debug_toolbar.urls)),
- )
+ ) + urlconf_module.urlpatterns
clear_url_caches()