diff options
| author | Rob Hudson | 2008-10-02 22:42:34 -0700 |
|---|---|---|
| committer | Rob Hudson | 2008-10-02 22:42:34 -0700 |
| commit | 04be402d080877abbc18931cb853933261fb332f (patch) | |
| tree | 80934496a7057e1533a9b3f26928bcfe4be30ee3 /debug_toolbar/templates | |
| parent | ca2be8d277bd2f8772a7fed658507c8b47120a5e (diff) | |
| download | django-debug-toolbar-04be402d080877abbc18931cb853933261fb332f.tar.bz2 | |
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.
Diffstat (limited to 'debug_toolbar/templates')
7 files changed, 11 insertions, 9 deletions
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')); } </script> +<script type="text/javascript" src="{{ BASE_URL }}/__debug__/m/toolbar.js"></script> <style type="text/css"> @import url({{ BASE_URL }}/__debug__/m/toolbar.css); </style> 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 @@ +<h3>HTTP Headers</h3> <table> <thead> <tr> @@ -7,10 +8,10 @@ </thead> <tbody> {% for key, value in headers.iteritems %} - <tr class="{% cycle 'row1' 'row2' %}"> + <tr class="{% cycle 'odd' 'even' %}"> <td>{{ key|escape }}</td> <td>{{ value|escape }}</td> </tr> {% endfor %} </tbody> -</table>
\ No newline at end of file +</table> 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 @@ </thead> <tbody> {% for record in records %} - <tr class="{% cycle 'row1' 'row2' %}"> + <tr class="{% cycle 'odd' 'even' %}"> <td>{{ record.level }}</td> <td>{{ record.time|date:"h:i:s m/d/Y" }}</td> <td>{{ record.message }}</td> 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 @@ </thead> <tbody> {% for key, value in cookies %} - <tr class="{% cycle 'row1' 'row2' %}"> + <tr class="{% cycle 'odd' 'even' %}"> <td>{{ key|escape }}</td> <td>{{ value|escape }}</td> </tr> @@ -38,7 +38,7 @@ </thead> <tbody> {% for key, value in session %} - <tr class="{% cycle 'row1' 'row2' %}"> + <tr class="{% cycle 'odd' 'even' %}"> <td>{{ key|escape }}</td> <td>{{ value|escape }}</td> </tr> @@ -59,7 +59,7 @@ </thead> <tbody> {% for key, value in get %} - <tr class="{% cycle 'row1' 'row2' %}"> + <tr class="{% cycle 'odd' 'even' %}"> <td>{{ key|escape }}</td> <td>{{ value|join:", "|escape }}</td> </tr> 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 @@ </thead> <tbody> {% for var in settings.items|dictsort:"0" %} - <tr> + <tr class="{% cycle 'odd' 'even' %}"> <td>{{ var.0 }}</td> <td><code>{{ var.1|pprint }}</code></td> </tr> 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 @@ </thead> <tbody> {% for query in queries %} - <tr class="{% cycle 'row1' 'row2' %}"> + <tr class="{% cycle 'odd' 'even' %}"> <td>{{ query.time|floatformat:"4" }}</td> <td> {% 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 @@ </thead> <tbody> {% for row in result %} - <tr class="{% cycle 'row1' 'row2' %}"> + <tr class="{% cycle 'odd' 'even' %}"> {% for column in row %} <td>{{ column|escape }}</td> {% endfor %} |
