diff options
| -rw-r--r-- | debug_toolbar/panels/timer.py | 5 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/timer.html | 22 |
2 files changed, 20 insertions, 7 deletions
diff --git a/debug_toolbar/panels/timer.py b/debug_toolbar/panels/timer.py index b93c843..cafdb05 100644 --- a/debug_toolbar/panels/timer.py +++ b/debug_toolbar/panels/timer.py @@ -1,7 +1,6 @@ -import time, resource - +import resource +import time from django.template.loader import render_to_string - from debug_toolbar.panels import DebugPanel diff --git a/debug_toolbar/templates/debug_toolbar/panels/timer.html b/debug_toolbar/templates/debug_toolbar/panels/timer.html index 161507c..1b077c6 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/timer.html +++ b/debug_toolbar/templates/debug_toolbar/panels/timer.html @@ -1,7 +1,21 @@ <h3>Resource Usage</h3> <table> - <colgroup><col width="50%" align="right" /><col width="50%" /></colgroup> - {% for row in rows %} - <tr><td align="right">{{ row.1 }}</td><th>{{ row.0 }}</th></tr> - {% endfor %} + <colgroup> + <col style="width:20%"/> + <col/> + </colgroup> + <thead> + <tr> + <th>Key</th> + <th>Value</th> + </tr> + </thead> + <tbody> + {% for key, value in rows %} + <tr class="{% cycle 'odd' 'even' %}"> + <td>{{ key|escape }}</td> + <td>{{ value|escape }}</td> + </tr> + {% endfor %} + </tbody> </table> |
