1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Refs #25165 -- Fixed JSON serialization for add/edit popup in the admin.

Forwardport of test in o839d71d8562abe0b245024e55ca1d02a45e58fd from stable/1.9.x
(refs #25997).
This commit is contained in:
Alexander Gaevsky
2016-01-07 11:07:15 +02:00
committed by Tim Graham
parent 822a03b3e4
commit ade54ffa34
5 changed files with 55 additions and 20 deletions

View File

@@ -1135,9 +1135,9 @@ class ModelAdmin(BaseModelAdmin):
new_value = obj.serializable_value(attr)
popup_response_data = json.dumps({
'action': 'change',
'value': value,
'value': six.text_type(value),
'obj': six.text_type(obj),
'new_value': new_value,
'new_value': six.text_type(new_value),
})
return SimpleTemplateResponse('admin/popup_response.html', {
'popup_response_data': popup_response_data,