mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 05:20:12 +03:00
Merge fix for #4931
This commit is contained in:
commit
f43e8fa946
|
@ -1,7 +1,7 @@
|
|||
{% load rest_framework %}
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
{% for key, value in value.items %}
|
||||
{% for key, value in value %}
|
||||
<tr>
|
||||
<th>{{ key|format_value }}</th>
|
||||
<td>{{ value|format_value }}</td>
|
||||
|
|
|
@ -148,7 +148,7 @@ def format_value(value):
|
|||
return template_render(template, context)
|
||||
elif isinstance(value, dict):
|
||||
template = loader.get_template('rest_framework/admin/dict_value.html')
|
||||
context = {'value': value}
|
||||
context = {'value': value.items()}
|
||||
return template_render(template, context)
|
||||
elif isinstance(value, six.string_types):
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue
Block a user