diff options
Diffstat (limited to 'debug_toolbar')
| -rw-r--r-- | debug_toolbar/panels/request_vars.py | 2 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/request_vars.html | 38 | 
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> | 
