Switch to studio_view

This commit is contained in:
Julian Arni
2013-08-02 16:09:29 -04:00
parent 562456ade7
commit 7bfb0804f8

View File

@@ -75,9 +75,13 @@ def preview_component(request, location):
component = modulestore().get_item(location)
# wrap_xmodule expects a function, so make a constant function
def get_render():
return component.runtime.render(component, None, "studio_view").content
return render_to_response('component.html', {
'preview': get_module_previews(request, component)[0],
'editor': wrap_xmodule(component.get_html, component, 'xmodule_edit.html')(),
'editor': wrap_xmodule(get_render, component, 'xmodule_edit.html')(),
})