Merge fix for #4931

This commit is contained in:
tim watts 2017-03-01 20:50:07 +00:00
commit f43e8fa946
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{% load rest_framework %} {% load rest_framework %}
<table class="table table-striped"> <table class="table table-striped">
<tbody> <tbody>
{% for key, value in value.items %} {% for key, value in value %}
<tr> <tr>
<th>{{ key|format_value }}</th> <th>{{ key|format_value }}</th>
<td>{{ value|format_value }}</td> <td>{{ value|format_value }}</td>

View File

@ -148,7 +148,7 @@ def format_value(value):
return template_render(template, context) return template_render(template, context)
elif isinstance(value, dict): elif isinstance(value, dict):
template = loader.get_template('rest_framework/admin/dict_value.html') template = loader.get_template('rest_framework/admin/dict_value.html')
context = {'value': value} context = {'value': value.items()}
return template_render(template, context) return template_render(template, context)
elif isinstance(value, six.string_types): elif isinstance(value, six.string_types):
if ( if (