% if waffle_flag_enabled:
- <%static:studiofrontend page="AssetsPage" lang="fr">
- {
- "id": "${context_course.id | n, js_escaped_string}",
- "name": "${context_course.display_name_with_default | n, js_escaped_string}",
- "url_name": "${context_course.location.name | n, js_escaped_string}",
- "org": "${context_course.location.org | n, js_escaped_string}",
- "num": "${context_course.location.course | n, js_escaped_string}",
- "display_course_number": "${context_course.display_coursenumber | n, js_escaped_string}",
- "revision": "${context_course.location.revision | n, js_escaped_string}"
+ <%static:studiofrontend page="AssetsPage" lang="en">
+ {
+ "course": {
+ "id": "${context_course.id | n, js_escaped_string}",
+ "name": "${context_course.display_name_with_default | n, js_escaped_string}",
+ "url_name": "${context_course.location.name | n, js_escaped_string}",
+ "org": "${context_course.location.org | n, js_escaped_string}",
+ "num": "${context_course.location.course | n, js_escaped_string}",
+ "display_course_number": "${context_course.display_coursenumber | n, js_escaped_string}",
+ "revision": "${context_course.location.revision | n, js_escaped_string}"
+ }
}
%static:studiofrontend>
% else:
diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html
index 9767468c2a..2e0c5ca49e 100644
--- a/common/djangoapps/pipeline_mako/templates/static_content.html
+++ b/common/djangoapps/pipeline_mako/templates/static_content.html
@@ -101,25 +101,18 @@ source, template_path = Loader(engine).load_template_source(path)
from webpack_loader.exceptions import WebpackLoaderBadStatsError
import json
- def _convert_dict_to_json(input_dict):
- output_json = "{"
- for key in input_dict:
- output_json = "{}{}:\"{}\",".format(output_json, key, input_dict[key])
- output_json += "}"
- return output_json
-
body = capture(caller.body)
body_dict = json.loads(body)
body_dict['lang'] = lang
return Template("""
-
{% load render_bundle from webpack_loader %}
{% render_bundle page %}
""").render(Context({
- 'body': _convert_dict_to_json(body_dict),
+ 'body': json.dumps(body_dict),
'page': page
}))
%>
diff --git a/package.json b/package.json
index 95818fd36b..bcac30cfe7 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"dependencies": {
"@edx/edx-bootstrap": "^0.4.1",
"@edx/paragon": "^0.2.0",
- "@edx/studio-frontend": "^0.3.0",
+ "@edx/studio-frontend": "^0.4.0",
"babel-core": "^6.23.0",
"babel-loader": "^6.4.0",
"babel-plugin-transform-class-properties": "^6.24.1",