diff options
| author | Malcolm Tredinnick | 2008-09-21 10:47:05 +1000 |
|---|---|---|
| committer | Malcolm Tredinnick | 2008-09-24 10:56:23 +1000 |
| commit | f4d0f529a31ec4904501c43b2bd847b440fd5c08 (patch) | |
| tree | a74ab3a5f4e496616186f2fba1f87e76e1eab993 /debug_toolbar | |
| parent | fb5788d8643320724a65890ce3df86d5e2bf591b (diff) | |
| download | django-debug-toolbar-f4d0f529a31ec4904501c43b2bd847b440fd5c08.tar.bz2 | |
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.
Diffstat (limited to 'debug_toolbar')
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/cache.html | 3 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/templates.html | 6 |
2 files changed, 5 insertions, 4 deletions
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 @@ <td>{{ cache.get_many }}</td> </tr> </table> +{% if cache.calls %} <h3>Breakdown</h3> <table> <thead> @@ -51,4 +52,4 @@ </tr> {% endfor %} </tbody> -</table>
\ No newline at end of file +</table>{% 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 @@ -<h3>Template path(s):</h3> +<h3>Template path{{ template_dirs|length|pluralize }}:</h3> {% if template_dirs %} <ol> {% for template in template_dirs %} @@ -6,7 +6,7 @@ {% endfor %} </ol> {% else %} - None + <p>None</p> {% endif %} <h3>Templates Used</h3> {% if templates %} @@ -21,5 +21,5 @@ {% endfor %} </dl> {% else %} - None + <p>None</p> {% endif %} |
