diff options
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/base.html | 4 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/sql.html | 8 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/templates.html | 4 | ||||
| -rw-r--r-- | debug_toolbar/toolbar/loader.py | 5 | ||||
| -rw-r--r-- | tests/test_integration.py | 1 |
5 files changed, 9 insertions, 13 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index f8bd377..4c82140 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n %}{% load url from future %} <style type="text/css"> @media print { #djDebug {display:none;}} </style> @@ -9,7 +9,7 @@ if(!window.jQuery) document.write('<scr'+'ipt src="{{ STATIC_URL }}debug_toolbar <script src="{{ STATIC_URL }}debug_toolbar/js/jquery.cookie.js"></script> <script src="{{ STATIC_URL }}debug_toolbar/js/toolbar.js"></script> <div id="djDebug" style="display:none;" dir="ltr" - data-toolbar-id="{{ toolbar_id }}" data-render-panel-url="/__debug__/render_panel/" + data-toolbar-id="{{ toolbar_id }}" data-render-panel-url="{% url 'djdt:render_panel' %}" {{ TOOLBAR_ROOT_TAG_ATTRS|safe }}> <div style="display:none;" id="djDebugToolbar"> <ul id="djDebugPanelList"> diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 064413c..54babfc 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n %}{% load url from future %} {% load debug_toolbar_utils %} <div class="clearfix"> <ul class="stats"> @@ -47,11 +47,11 @@ <form method="post"> {{ query.form }} - <button formaction="/__debug__/sql_select/" class="remoteCall">Sel</button> - <button formaction="/__debug__/sql_explain/" class="remoteCall">Expl</button> + <button formaction="{% url 'djdt:sql_select' %}" class="remoteCall">Sel</button> + <button formaction="{% url 'djdt:sql_explain' %}" class="remoteCall">Expl</button> {% ifequal query.engine 'mysql' %} - <button formaction="/__debug__/sql_profile/" class="remoteCall">Prof</button> + <button formaction="{% url 'djdt:sql_profile' %}" class="remoteCall">Prof</button> {% endifequal %} </form> {% endif %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 7e44a46..5cbb742 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n %}{% load url from future %} <h4>{% blocktrans count template_dirs|length as template_count %}Template path{% plural %}Template paths{% endblocktrans %}</h4> {% if template_dirs %} <ol> @@ -14,7 +14,7 @@ {% if templates %} <dl> {% for template in templates %} - <dt><strong><a class="remoteCall toggleTemplate" href="/__debug__/template_source/?template={{ template.template.name }}">{{ template.template.name|addslashes }}</a></strong></dt> + <dt><strong><a class="remoteCall toggleTemplate" href="{% url 'djdt:template_source' %}?template={{ template.template.name }}">{{ template.template.name|addslashes }}</a></strong></dt> <dd><samp>{{ template.template.origin_name|addslashes }}</samp></dd> {% if template.context %} <dd> diff --git a/debug_toolbar/toolbar/loader.py b/debug_toolbar/toolbar/loader.py index de4aa93..870eec3 100644 --- a/debug_toolbar/toolbar/loader.py +++ b/debug_toolbar/toolbar/loader.py @@ -18,13 +18,10 @@ class DebugToolbar(object): self.request = request self._panels = SortedDict() base_url = self.request.META.get('SCRIPT_NAME', '') - self.config = { - 'MEDIA_URL': '%s/__debug__/m/' % base_url, - } + self.config = {} self.config.update(CONFIG) self.template_context = { 'BASE_URL': base_url, # for backwards compatibility - 'DEBUG_TOOLBAR_MEDIA_URL': self.config['MEDIA_URL'], 'STATIC_URL': settings.STATIC_URL, 'TOOLBAR_ROOT_TAG_ATTRS': self.config['ROOT_TAG_ATTRS'], } diff --git a/tests/test_integration.py b/tests/test_integration.py index 6755917..412b14b 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -6,7 +6,6 @@ from xml.etree import ElementTree as ET from django.test import TestCase, RequestFactory from django.test.utils import override_settings -from django.utils import six from debug_toolbar.middleware import DebugToolbarMiddleware, show_toolbar from debug_toolbar.panels.request_vars import RequestVarsDebugPanel |
