diff options
| author | Rob Hudson | 2008-12-09 14:14:46 -0800 | 
|---|---|---|
| committer | Rob Hudson | 2008-12-09 14:14:46 -0800 | 
| commit | 9f5c2280ec25c162b720a6e864b081934126cecc (patch) | |
| tree | 069b3eb339274a52deb975ae66bc932f71078b78 | |
| parent | 47d1a4ff38bc48a6dd54246556434a72c0476bb0 (diff) | |
| download | django-debug-toolbar-9f5c2280ec25c162b720a6e864b081934126cecc.tar.bz2 | |
Minor cleanup and template change to previous commit.
| -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> | 
