Pass config into nbconvert exporters

This commit is contained in:
Thomas Kluyver 2013-12-19 12:35:19 -08:00
parent eb680ddaa6
commit 75109fa2f3

View File

@ -19,7 +19,7 @@ class NbconvertFileHandler(IPythonHandler):
@web.authenticated @web.authenticated
def get(self, format, path='', name=None): def get(self, format, path='', name=None):
exporter = exporter_map[format]() exporter = exporter_map[format](config=self.config)
path = path.strip('/') path = path.strip('/')
os_path = self.notebook_manager.get_os_path(name, path) os_path = self.notebook_manager.get_os_path(name, path)
@ -52,7 +52,7 @@ class NbconvertPostHandler(IPythonHandler):
@web.authenticated @web.authenticated
def post(self, format): def post(self, format):
exporter = exporter_map[format]() exporter = exporter_map[format](config=self.config)
model = self.get_json_body() model = self.get_json_body()
nbnode = to_notebook_json(model['content']) nbnode = to_notebook_json(model['content'])