aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar')
-rw-r--r--debug_toolbar/templates/debug_toolbar/base.html8
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/profiling.html5
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql.html4
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/templates.html4
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/timer.html4
-rw-r--r--debug_toolbar/toolbar.py6
6 files changed, 13 insertions, 18 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html
index 8a5e070..a9d82dc 100644
--- a/debug_toolbar/templates/debug_toolbar/base.html
+++ b/debug_toolbar/templates/debug_toolbar/base.html
@@ -1,13 +1,13 @@
-{% load i18n %}{% load url from future %}
+{% load i18n %}{% load static from staticfiles %}{% load url from future %}
<style type="text/css">
@media print { #djDebug {display:none;}}
</style>
-<link rel="stylesheet" href="{{ STATIC_URL }}debug_toolbar/css/toolbar.css" type="text/css" />
+<link rel="stylesheet" href="{% static 'debug_toolbar/css/toolbar.css' %}" type="text/css" />
<script>//<![CDATA[
if(!window.jQuery) document.write('<scr'+'ipt src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></scr'+'ipt>');
//]]></script>
-<script src="{{ STATIC_URL }}debug_toolbar/js/jquery.cookie.js"></script>
-<script src="{{ STATIC_URL }}debug_toolbar/js/toolbar.js"></script>
+<script src="{% static 'debug_toolbar/js/jquery.cookie.js' %}"></script>
+<script src="{% static 'debug_toolbar/js/toolbar.js' %}"></script>
<div id="djDebug" style="display:none;" dir="ltr"
data-store-id="{{ toolbar.store_id }}" data-render-panel-url="{% url 'djdt:render_panel' %}"
{{ toolbar.config.ROOT_TAG_EXTRA_ATTRS|safe }}>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/profiling.html b/debug_toolbar/templates/debug_toolbar/panels/profiling.html
index 34ecc87..9d34043 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/profiling.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/profiling.html
@@ -1,5 +1,4 @@
-{% load i18n %}
-
+{% load i18n %}{% load static from staticfiles %}
<table width="100%">
<thead>
<tr>
@@ -42,4 +41,4 @@
</tbody>
</table>
-<script src="{{ STATIC_URL }}debug_toolbar/js/toolbar.profiling.js"></script>
+<script src="{% static 'debug_toolbar/js/toolbar.profiling.js' %}"></script>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index 33c496c..599f194 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 l10n %}{% load url from future %}
+{% load i18n l10n %}{% load static from staticfiles %}{% load url from future %}
<div class="clearfix">
<ul class="stats">
{% for alias, info in databases %}
@@ -92,4 +92,4 @@
<p>{% trans "No SQL queries were recorded during this request." %}</p>
{% endif %}
-<script src="{{ STATIC_URL }}debug_toolbar/js/toolbar.sql.js"></script>
+<script src="{% static 'debug_toolbar/js/toolbar.sql.js' %}"></script>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html
index dbe93f8..18da4c9 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 url from future %}
+{% load i18n %}{% load static from staticfiles %}{% load url from future %}
<h4>{% blocktrans count template_dirs|length as template_count %}Template path{% plural %}Template paths{% endblocktrans %}</h4>
{% if template_dirs %}
<ol>
@@ -43,4 +43,4 @@
<p>{% trans 'None' %}</p>
{% endif %}
-<script src="{{ STATIC_URL }}debug_toolbar/js/toolbar.template.js"></script>
+<script src="{% static 'debug_toolbar/js/toolbar.template.js' %}"></script>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/timer.html b/debug_toolbar/templates/debug_toolbar/panels/timer.html
index 977386d..11c5984 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/timer.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/timer.html
@@ -1,4 +1,4 @@
-{% load i18n %}
+{% load i18n %}{% load static from staticfiles %}
<h4>{% trans 'Resource Usage' %}</h4>
<table>
<colgroup>
@@ -41,4 +41,4 @@
</tbody>
</table>
</div>
-<script src="{{ STATIC_URL }}debug_toolbar/js/toolbar.timer.js"></script>
+<script src="{% static 'debug_toolbar/js/toolbar.timer.js' %}"></script>
diff --git a/debug_toolbar/toolbar.py b/debug_toolbar/toolbar.py
index de9d69d..d50ad52 100644
--- a/debug_toolbar/toolbar.py
+++ b/debug_toolbar/toolbar.py
@@ -6,7 +6,6 @@ from __future__ import absolute_import, unicode_literals
import uuid
-from django.conf import settings
from django.conf.urls import patterns, url
from django.core.exceptions import ImproperlyConfigured
from django.template.loader import render_to_string
@@ -21,10 +20,7 @@ class DebugToolbar(object):
def __init__(self, request):
self.request = request
self.config = dt_settings.CONFIG.copy()
- self.template_context = {
- 'STATIC_URL': settings.STATIC_URL,
- 'toolbar': self,
- }
+ self.template_context = {'toolbar': self}
self._panels = SortedDict()
for panel_class in self.get_panel_classes():
panel_instance = panel_class(self, context=self.template_context)