aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Hudson2009-11-06 20:06:47 -0800
committerRob Hudson2009-11-06 20:06:47 -0800
commitf36b72655349cf3b8e9105bed3be5cd065162476 (patch)
tree6d7f1b2d188ad397223f08cfa6f2f678b7c99daf
parent96fc01758203d45b34732dc17bb67f71f0cba3cc (diff)
downloaddjango-debug-toolbar-f36b72655349cf3b8e9105bed3be5cd065162476.tar.bz2
Updated view info to be horizontal tabular.
-rw-r--r--debug_toolbar/panels/request_vars.py2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/request_vars.html38
2 files changed, 19 insertions, 21 deletions
diff --git a/debug_toolbar/panels/request_vars.py b/debug_toolbar/panels/request_vars.py
index c8c281a..ab356a0 100644
--- a/debug_toolbar/panels/request_vars.py
+++ b/debug_toolbar/panels/request_vars.py
@@ -19,7 +19,7 @@ class RequestVarsDebugPanel(DebugPanel):
def process_request(self, request):
self.request = request
-
+
def process_view(self, request, view_func, view_args, view_kwargs):
self.view_func = view_func
self.view_args = view_args
diff --git a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
index 124b86e..377076b 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
@@ -2,27 +2,25 @@
<h4>{% trans 'View information' %}</h4>
<table>
- <colgroup>
- <col style="width:20%"/>
- <col/>
- </colgroup>
+ <thead>
+ <tr>
+ <th>{% trans 'View Function' %}</th>
+ <th>{% trans 'args' %}</th>
+ <th>{% trans 'kwargs' %}</th>
+ </tr>
+ </thead>
<tbody>
- <tr>
- <th>{% trans 'View function' %}</th>
- <td>{{ view_func }}</td>
- </tr>
- {% if view_args %}
- <tr>
- <th>{% trans 'View arguments' %}</th>
- <td>{{ view_args }}</td>
- </tr>
- {% endif %}
- {% if view_kwargs %}
- <tr>
- <th>{% trans 'View keyword arguments' %}</th>
- <td>{{ view_kwargs }}</td>
- </tr>
- {% endif %}
+ <tr>
+ <td>{{ view_func }}</td>
+ <td>{{ view_args|default:"None" }}</td>
+ <td>
+ {% for k, v in view_kwargs.items %}
+ {{ k }}={{ v }}{% if not forloop.last %}, {% endif %}
+ {% empty %}
+ None
+ {% endfor %}
+ </td>
+ </tr>
</tbody>
</table>