aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAymeric Augustin2013-11-16 21:54:11 +0100
committerAymeric Augustin2013-11-16 21:57:38 +0100
commitf2382e747fa344d3ba13eda2cf60def6fc0df480 (patch)
tree009e01308fbcc3e4dcbd00fa5ff1df3d1b1ccc87
parent7c97a98bd1c8f3a90e308df7f96361844c492e69 (diff)
downloaddjango-debug-toolbar-f2382e747fa344d3ba13eda2cf60def6fc0df480.tar.bz2
Better solution than ca24b3f.
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql.html5
-rw-r--r--debug_toolbar/templatetags/__init__.py0
-rw-r--r--debug_toolbar/templatetags/debug_toolbar_utils.py12
3 files changed, 2 insertions, 15 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index d454d61..33c496c 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -1,5 +1,4 @@
-{% load i18n %}{% load url from future %}
-{% load debug_toolbar_utils %}
+{% load i18n l10n %}{% load url from future %}
<div class="clearfix">
<ul class="stats">
{% for alias, info in databases %}
@@ -35,7 +34,7 @@
</div>
</td>
<td class="timeline">
- <div class="djDebugTimeline"><div class="djDebugLineChart{% if query.is_slow %} djDebugLineChartWarning{% endif %}" style="left:{{ query.start_offset|dotted_number }}%;"><strong style="width:{{ query.width_ratio_relative|dotted_number }}%;">{{ query.width_ratio }}%</strong></div></div>
+ <div class="djDebugTimeline"><div class="djDebugLineChart{% if query.is_slow %} djDebugLineChartWarning{% endif %}" style="left:{{ query.start_offset|unlocalize }}%;"><strong style="width:{{ query.width_ratio_relative|unlocalize }}%;">{{ query.width_ratio }}%</strong></div></div>
</td>
<td class="time">
{{ query.duration|floatformat:"2" }}
diff --git a/debug_toolbar/templatetags/__init__.py b/debug_toolbar/templatetags/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/debug_toolbar/templatetags/__init__.py
+++ /dev/null
diff --git a/debug_toolbar/templatetags/debug_toolbar_utils.py b/debug_toolbar/templatetags/debug_toolbar_utils.py
deleted file mode 100644
index c96f868..0000000
--- a/debug_toolbar/templatetags/debug_toolbar_utils.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from __future__ import unicode_literals
-
-from django import template
-from django.utils.numberformat import format
-
-register = template.Library()
-
-
-@register.filter
-def dotted_number(number):
- number = float(number)
- return format(number, '.', 6)