##// END OF EJS Templates
Deleted jargon-ish reference to no-connectity.
Deleted jargon-ish reference to no-connectity.

File last commit:

r13837:c5bbb0d0
r14007:5e964a9c
Show More
handlers.py
22 lines | 571 B | text/x-python | PythonLexer
Thomas Kluyver
Separate listing nbconvert exporters to /api/nbconvert
r13837 import json
from tornado import web
from ...base.handlers import IPythonHandler, json_errors
from IPython.nbconvert.exporters.export import exporter_map
class NbconvertRootHandler(IPythonHandler):
SUPPORTED_METHODS = ('GET',)
@web.authenticated
@json_errors
def get(self):
res = {}
for format, exporter in exporter_map.items():
res[format] = info = {}
info['output_mimetype'] = exporter.output_mimetype
self.finish(json.dumps(res))
default_handlers = [
(r"/api/nbconvert", NbconvertRootHandler),
]