From ef23e6dc31c66abd0c6784bf0044f53271d34b1e Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 11 Nov 2013 16:15:30 +0100 Subject: Simplify monkey-patching of URLs into urlconf. --- debug_toolbar/urls.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'debug_toolbar/urls.py') diff --git a/debug_toolbar/urls.py b/debug_toolbar/urls.py index 05ef245..860187a 100644 --- a/debug_toolbar/urls.py +++ b/debug_toolbar/urls.py @@ -1,20 +1,18 @@ """ URLpatterns for the debug toolbar. -These should not be loaded explicitly; the debug toolbar middleware will patch -this into the urlconf for the request. +The debug toolbar middleware will monkey-patch them into the default urlconf +if they aren't explicitly included. """ from __future__ import unicode_literals from django.conf.urls import patterns, url -_PREFIX = '__debug__' - urlpatterns = patterns('debug_toolbar.views', # noqa - url(r'^%s/render_panel/$' % _PREFIX, 'render_panel', name='render_panel'), - url(r'^%s/sql_select/$' % _PREFIX, 'sql_select', name='sql_select'), - url(r'^%s/sql_explain/$' % _PREFIX, 'sql_explain', name='sql_explain'), - url(r'^%s/sql_profile/$' % _PREFIX, 'sql_profile', name='sql_profile'), - url(r'^%s/template_source/$' % _PREFIX, 'template_source', name='template_source'), + url(r'^render_panel/$', 'render_panel', name='render_panel'), + url(r'^sql_select/$', 'sql_select', name='sql_select'), + url(r'^sql_explain/$', 'sql_explain', name='sql_explain'), + url(r'^sql_profile/$', 'sql_profile', name='sql_profile'), + url(r'^template_source/$', 'template_source', name='template_source'), ) -- cgit v1.2.3