From 04be402d080877abbc18931cb853933261fb332f Mon Sep 17 00:00:00 2001
From: Rob Hudson
Date: Thu, 2 Oct 2008 22:42:34 -0700
Subject: Moving debug toolbar to the bottom of the HTML document and adjusting
CSS to position toolbar at top. Injecting toolbar at the bottom has a few
advantages, such as removing the regular expression substitution making it
about 5x faster (depending on document size), JS and CSS have a lesser chance
of conflicting with others on the page.
---
debug_toolbar/templates/debug_toolbar/base.html | 1 +
debug_toolbar/templates/debug_toolbar/panels/headers.html | 5 +++--
debug_toolbar/templates/debug_toolbar/panels/logger.html | 2 +-
debug_toolbar/templates/debug_toolbar/panels/request_vars.html | 6 +++---
debug_toolbar/templates/debug_toolbar/panels/settings_vars.html | 2 +-
debug_toolbar/templates/debug_toolbar/panels/sql.html | 2 +-
debug_toolbar/templates/debug_toolbar/panels/sql_explain.html | 2 +-
7 files changed, 11 insertions(+), 9 deletions(-)
(limited to 'debug_toolbar/templates')
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html
index 88938d9..ba9fdf3 100644
--- a/debug_toolbar/templates/debug_toolbar/base.html
+++ b/debug_toolbar/templates/debug_toolbar/base.html
@@ -4,6 +4,7 @@
document.write(unescape('%3Cscript src="' + jquery_url + '" type="text/javascript"%3E%3C/script%3E'));
}
+
diff --git a/debug_toolbar/templates/debug_toolbar/panels/headers.html b/debug_toolbar/templates/debug_toolbar/panels/headers.html
index 61c6b83..3ac7fd3 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/headers.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/headers.html
@@ -1,3 +1,4 @@
+
HTTP Headers
@@ -7,10 +8,10 @@
{% for key, value in headers.iteritems %}
-
+
| {{ key|escape }} |
{{ value|escape }} |
{% endfor %}
-
\ No newline at end of file
+
diff --git a/debug_toolbar/templates/debug_toolbar/panels/logger.html b/debug_toolbar/templates/debug_toolbar/panels/logger.html
index 515c7fb..c079065 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/logger.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/logger.html
@@ -11,7 +11,7 @@
{% for record in records %}
-
+
| {{ record.level }} |
{{ record.time|date:"h:i:s m/d/Y" }} |
{{ record.message }} |
diff --git a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
index fdb0a74..fe317ae 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
@@ -13,7 +13,7 @@
{% for key, value in cookies %}
-
+
| {{ key|escape }} |
{{ value|escape }} |
@@ -38,7 +38,7 @@
{% for key, value in session %}
-
+
| {{ key|escape }} |
{{ value|escape }} |
@@ -59,7 +59,7 @@
{% for key, value in get %}
-
+
| {{ key|escape }} |
{{ value|join:", "|escape }} |
diff --git a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
index f1e6684..1d332bf 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
@@ -8,7 +8,7 @@
{% for var in settings.items|dictsort:"0" %}
-
+
| {{ var.0 }} |
{{ var.1|pprint }} |
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index e218f22..6a2d077 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -9,7 +9,7 @@
{% for query in queries %}
-
+
| {{ query.time|floatformat:"4" }} |
{% if query.params %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
index d2fd567..dc306f0 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
@@ -16,7 +16,7 @@
|
{% for row in result %}
-
+
{% for column in row %}
| {{ column|escape }} |
{% endfor %}
--
cgit v1.2.3