Skip to content

Commit

Permalink
Updated view info to be horizontal tabular.
Browse files Browse the repository at this point in the history
  • Loading branch information
robhudson committed Nov 7, 2009
1 parent 96fc017 commit f36b726
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion debug_toolbar/panels/request_vars.py
Expand Up @@ -19,7 +19,7 @@ def url(self):

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
Expand Down
38 changes: 18 additions & 20 deletions debug_toolbar/templates/debug_toolbar/panels/request_vars.html
Expand Up @@ -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>

Expand Down

0 comments on commit f36b726

Please sign in to comment.