Passed cls=EdxJSONEncoder on json.dumps to fix save, edit and import.

STUD-2096
This commit is contained in:
Waheed Ahmed
2014-08-18 13:26:30 +05:00
parent 3ac3a3152a
commit f686e7d0b9
5 changed files with 135 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
import hashlib
import copy
import json
from xmodule.modulestore import EdxJSONEncoder
hlskey = hashlib.md5(module.location.to_deprecated_string().encode('utf-8')).hexdigest()
%>
@@ -33,4 +34,4 @@
<%include file="source-edit.html" />
% endif
<div class="wrapper-comp-settings metadata_edit" id="settings-tab" data-metadata='${json.dumps(metadata_field_copy) | h}'/>
<div class="wrapper-comp-settings metadata_edit" id="settings-tab" data-metadata='${json.dumps(metadata_field_copy, cls=EdxJSONEncoder) | h}'/>