def read(self, request, published_ws_id, to_ws_id): user = get_user_authentication(request) published_workspace = get_object_or_404(PublishedWorkSpace, id=published_ws_id) to_ws = get_object_or_404(WorkSpace, id=to_ws_id, creator=user) fillWorkspaceUsingTemplate(to_ws, published_workspace.template) result = {'result': 'ok', 'workspace_id': to_ws_id} return HttpResponse(json_encode(result), mimetype='application/json; charset=UTF-8')