From 414368b6ec0ed856752dce752afad140a03c97f6 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Thu, 11 Sep 2008 21:49:49 -0700 Subject: Patch submitted by Ned Batchelder to fix panel path slashes on Windows. --- debug_toolbar/templates/debug_toolbar/panels/templates.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 58904be..f9f03b5 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -12,8 +12,8 @@ {% if templates %}
{% for template in templates %} -
{{ template.0 }}
-
{{ template.1 }}
+
{{ template.0|addslashes }}
+
{{ template.1|addslashes }}
{% endfor %}
{% else %} -- cgit v1.2.3 From 8377ea179568c1fbf8f46db1234e85d689daae0a Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Thu, 11 Sep 2008 23:19:27 -0700 Subject: Adding JSON params to pass to view and adding link for explain. --- debug_toolbar/templates/debug_toolbar/panels/sql.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 046be7f..9a6638b 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -4,13 +4,15 @@ Time (ms) Query + Action {% for query in queries %} {{ query.time|floatformat:"4" }} -
{{ query.sql|escape }}
+
{{ query.sql|wordwrap:80|escape }}
+ EXPLAIN {% endfor %} -- cgit v1.2.3 From 4591e34f0140c43e68e4ecd97eae7f3ea05878f6 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Thu, 11 Sep 2008 23:21:12 -0700 Subject: Adding view to explain SQL passed in via query string. Hopefully this is database backend agnostic. Next up is connecting this with the SQL panel via AJAX. --- .../debug_toolbar/panels/sql_explain.html | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 debug_toolbar/templates/debug_toolbar/panels/sql_explain.html (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html new file mode 100644 index 0000000..757d43f --- /dev/null +++ b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html @@ -0,0 +1,25 @@ +

SQL Explained

+
+
Executed SQL
+
{{ sql|wordwrap:80 }}
+
Time
+
{{ time }} ms
+
+ + + + {% for h in headers %} + + {% endfor %} + + + + {% for row in result %} + + {% for column in row %} + + {% endfor %} + + {% endfor %} + +
{{ h|upper }}
{{ column|escape }}
-- cgit v1.2.3 From 5fd534e68dbd191c5d6062a39ae512b109cccbdb Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Mon, 15 Sep 2008 18:02:17 +0100 Subject: Modified scripts to use jQuery, and moved 'em to a better place. --- debug_toolbar/templates/debug_toolbar/base.html | 42 +++---------------------- 1 file changed, 5 insertions(+), 37 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 637e04d..8ee29d2 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,39 +1,7 @@ - + +
@@ -42,7 +10,7 @@ {% for panel in panels %}
  • {% if panel.has_content %} - {{ panel.title }} + {{ panel.title }} {% else %} {{ panel.title }} {% endif %} @@ -54,7 +22,7 @@ {% if panel.has_content %}
    - Close + Close
    {{ panel.content|safe }}
    -- cgit v1.2.3 From 7e27e62a690e98150f2294ff8f3aa7e43fc83e9c Mon Sep 17 00:00:00 2001 From: nbstrite Date: Tue, 16 Sep 2008 21:53:44 -0400 Subject: Fixed bug where django application was assumed to installed at / url. --- debug_toolbar/templates/debug_toolbar/base.html | 6 +++--- 1 file changed, 3 insertions(+), 3 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 8ee29d2..58f4820 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,7 +1,7 @@ - - + +
    -- cgit v1.2.3 From 455aacf49b03e9d4c5edd8e3843999cfafada563 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Tue, 16 Sep 2008 21:41:13 -0700 Subject: Minor stylistic changes. --- debug_toolbar/templates/debug_toolbar/base.html | 6 +++--- 1 file changed, 3 insertions(+), 3 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 58f4820..4cc028c 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,7 +1,7 @@ - - + +
    -- cgit v1.2.3 From e40b2c0fbdbd932be5f9d0550a16b6652de0d38d Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Thu, 18 Sep 2008 13:43:13 -0700 Subject: I noticed the template_rendered signal from the test suite also passed context, so I'm including the context with each template in the Template panel. This should make the designers happy. --- debug_toolbar/templates/debug_toolbar/panels/templates.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index f9f03b5..ee93708 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -12,8 +12,12 @@ {% if templates %}
    {% for template in templates %} -
    {{ template.0|addslashes }}
    -
    {{ template.1|addslashes }}
    +
    {{ template.template.name|addslashes }}
    +
    {{ template.template.origin_name|addslashes }}
    +
    + + +
    {% endfor %}
    {% else %} -- cgit v1.2.3 From 43bb25c874f765800076285e76b2b0ba1460a597 Mon Sep 17 00:00:00 2001 From: Nowell Strite Date: Fri, 19 Sep 2008 01:17:16 -0400 Subject: Fixed template panel to skip over debug_toolbar templates. Fixed a bug in template context output where rendering would hang while trying to autoescape the context variable output. --- debug_toolbar/templates/debug_toolbar/panels/templates.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index ee93708..0c47c5c 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -16,7 +16,7 @@
    {{ template.template.origin_name|addslashes }}
    - +
    {% endfor %} -- cgit v1.2.3 From 5a711759e75bfef4788498d9cfaa9fe019bcd15d Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Fri, 19 Sep 2008 10:47:16 -0700 Subject: Remove the safe filter from template context so objects don't turn into HTML tags (e.g. ) --- debug_toolbar/templates/debug_toolbar/panels/templates.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 0c47c5c..575d507 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -16,10 +16,10 @@
    {{ template.template.origin_name|addslashes }}
    - +
    {% endfor %} {% else %} None -{% endif %} \ No newline at end of file +{% endif %} -- cgit v1.2.3 From 6bd25be6b8345f0a08c99acc35877faafd2a08ee Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Sat, 20 Sep 2008 13:44:09 -0700 Subject: partly done with ajax support and js --- debug_toolbar/templates/debug_toolbar/base.html | 5 ++--- debug_toolbar/templates/debug_toolbar/panels/sql.html | 2 +- debug_toolbar/templates/debug_toolbar/panels/sql_explain.html | 1 + 3 files changed, 4 insertions(+), 4 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 4cc028c..e654219 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -21,11 +21,10 @@ {% for panel in panels %} {% if panel.has_content %}
    -
    - Close -
    + Close {{ panel.content|safe }}
    {% endif %} {% endfor %} +
    diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 246fa74..bd167bc 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -12,7 +12,7 @@ {{ query.time|floatformat:"4" }}
    {{ query.sql|wordwrap:80|escape }}
    - EXPLAIN + EXPLAIN {% endfor %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html index 757d43f..8219205 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html @@ -1,3 +1,4 @@ +« Back

    SQL Explained

    Executed SQL
    -- cgit v1.2.3 From f40ad85645f27fc4b80683acdbefd01a1da51afd Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Sat, 20 Sep 2008 17:00:19 -0700 Subject: Updating SQL panel to use Pygments for SQL highlighting if it's available, moving the EXPLAIN link to the left to avoid scrolling. I have a feeling that the SQL panel could use a serious security review since we're passing SQL in via GET which is, I'm sure, a big no-no. --- debug_toolbar/templates/debug_toolbar/panels/sql.html | 4 ++-- debug_toolbar/templates/debug_toolbar/panels/sql_explain.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index bd167bc..4663047 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -3,16 +3,16 @@ Time (ms) - Query Action + Query {% for query in queries %} {{ query.time|floatformat:"4" }} -
    {{ query.sql|wordwrap:80|escape }}
    EXPLAIN + {{ query.sql|safe }} {% endfor %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html index 8219205..d2fd567 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html @@ -2,7 +2,7 @@

    SQL Explained

    Executed SQL
    -
    {{ sql|wordwrap:80 }}
    +
    {{ sql|safe }}
    Time
    {{ time }} ms
    -- cgit v1.2.3 From a6abeef6a5a734ad28178f939560dd127c363544 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Sat, 20 Sep 2008 17:09:16 -0700 Subject: Patch from Alex Gaynor that fixes jQuery conflicts with Pinax and potentially other projects. --- debug_toolbar/templates/debug_toolbar/base.html | 1 - 1 file changed, 1 deletion(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index e654219..e1d66c5 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,5 +1,4 @@ - -- cgit v1.2.3 From 335cbb58f1681268eb61a04205b6a18f09f0a03a Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 20 Sep 2008 21:18:48 -0400 Subject: jquery now optional --- debug_toolbar/templates/debug_toolbar/base.html | 1 - 1 file changed, 1 deletion(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index e1d66c5..ba13294 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,4 +1,3 @@ - -- cgit v1.2.3 From c09b0dbc6e7cefd075819e6a272067f03b8534f1 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Sun, 21 Sep 2008 22:48:45 -0700 Subject: Load jQuery only if jQuery isn't already loaded. Patch from Alex Gaynor slightly modified to load jQuery locally to allow offline usage. --- debug_toolbar/templates/debug_toolbar/base.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index e1d66c5..f9844a1 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,4 +1,9 @@ - + -- cgit v1.2.3 From f4d0f529a31ec4904501c43b2bd847b440fd5c08 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 21 Sep 2008 10:47:05 +1000 Subject: A couple of small HTML and presentation cleanups. - Don't display the headings of the detailed usage table for the cache panel unless there's actually some content to display. - Use pluralisation filter on the template paths to avoid "path(s)". - If there are no templates used or no template paths, wrap "None" in a paragraph tag. --- debug_toolbar/templates/debug_toolbar/panels/cache.html | 3 ++- debug_toolbar/templates/debug_toolbar/panels/templates.html | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/cache.html b/debug_toolbar/templates/debug_toolbar/panels/cache.html index 21ea173..0dad9b1 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/cache.html +++ b/debug_toolbar/templates/debug_toolbar/panels/cache.html @@ -31,6 +31,7 @@ {{ cache.get_many }} +{% if cache.calls %}

    Breakdown

    @@ -51,4 +52,4 @@ {% endfor %} -
    \ No newline at end of file +{% endif %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 575d507..a0e1c1c 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -1,4 +1,4 @@ -

    Template path(s):

    +

    Template path{{ template_dirs|length|pluralize }}:

    {% if template_dirs %}
      {% for template in template_dirs %} @@ -6,7 +6,7 @@ {% endfor %}
    {% else %} - None +

    None

    {% endif %}

    Templates Used

    {% if templates %} @@ -21,5 +21,5 @@ {% endfor %}
    {% else %} - None +

    None

    {% endif %} -- cgit v1.2.3 From 7ea7e780b775680be3050a8d6eb71f63b5a1fd34 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Tue, 23 Sep 2008 19:55:18 -0700 Subject: Updating pygments styles to better match new toolbar styles. --- debug_toolbar/templates/debug_toolbar/panels/sql.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 4663047..0a8a6e0 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -12,8 +12,8 @@ {{ query.time|floatformat:"4" }} EXPLAIN - {{ query.sql|safe }} + {{ query.sql|safe }} {% endfor %} - \ No newline at end of file + -- cgit v1.2.3 From 159e690ff3d07c8821332942ae722bdf0bdf5208 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Tue, 23 Sep 2008 21:06:39 -0700 Subject: Add catch for non JSON serializable objects and don't show the EXPLAIN link for these. --- debug_toolbar/templates/debug_toolbar/panels/sql.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 0a8a6e0..052b36a 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -11,7 +11,11 @@ {% for query in queries %} {{ query.time|floatformat:"4" }} - EXPLAIN + + {% if query.params %} + EXPLAIN + {% endif %} + {{ query.sql|safe }} {% endfor %} -- cgit v1.2.3 From d74431411b5c390379bcac89a60628a26365d8c9 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Wed, 24 Sep 2008 12:40:02 +0200 Subject: Added context processors to TemplateDebugPanel --- .../templates/debug_toolbar/panels/templates.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 575d507..e878be2 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -23,3 +23,17 @@ {% else %} None {% endif %} +{% if context_processors %} +

    Context processors used:

    +
    +{% for key, value in context_processors.iteritems %} +
    {{ key|escape }}
    +
    + + +
    +{% endfor %} +
    +{% else %} + None +{% endif %} -- cgit v1.2.3 From 85d879803c88aa036934d36977a10b5d28b70aaa Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Wed, 24 Sep 2008 16:23:01 -0700 Subject: Adding a SHA-1 hash to the parameters passed to get the EXPLAIN query to avoid any sort of tampering of the SQL or parameters. --- debug_toolbar/templates/debug_toolbar/panels/sql.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 052b36a..e218f22 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -13,7 +13,7 @@ {{ query.time|floatformat:"4" }} {% if query.params %} - EXPLAIN + EXPLAIN {% endif %} {{ query.sql|safe }} -- cgit v1.2.3 From c70df302e1564a7f7fe7883d3e042419ece1d9e6 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 27 Sep 2008 15:50:47 -0400 Subject: added logger panel --- .../templates/debug_toolbar/panels/logger.html | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 debug_toolbar/templates/debug_toolbar/panels/logger.html (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/logger.html b/debug_toolbar/templates/debug_toolbar/panels/logger.html new file mode 100644 index 0000000..93443be --- /dev/null +++ b/debug_toolbar/templates/debug_toolbar/panels/logger.html @@ -0,0 +1,26 @@ +

    Log Messages

    +{% if records %} + + + + + + + + + + + {% for record in records %} + + + + + + + {% endfor %} + +
    LevelTimeMessageLocation
    {{ record.level }}{{ record.time|date:"h:i:s m/d/Y" }}{{ record.message }}{{ record.file }}:{{ record.line }}
    +{% else %} +

    No messages logged.

    +{% endif %} + -- cgit v1.2.3