diff --git a/notebook/static/services/API.yaml b/notebook/services/api/api.yaml similarity index 100% rename from notebook/static/services/API.yaml rename to notebook/services/api/api.yaml diff --git a/notebook/services/api/handlers.py b/notebook/services/api/handlers.py index 4176f2e8a..4230b5dc8 100644 --- a/notebook/services/api/handlers.py +++ b/notebook/services/api/handlers.py @@ -5,11 +5,12 @@ from tornado import web from ...base.handlers import IPythonHandler +import os class APIHandler(web.StaticFileHandler, IPythonHandler): def initialize(self): - web.StaticFileHandler.initialize(self, path='') + web.StaticFileHandler.initialize(self, path=os.path.dirname(__file__)) @web.authenticated def get(self): @@ -17,5 +18,5 @@ class APIHandler(web.StaticFileHandler, IPythonHandler): return web.StaticFileHandler.get(self, 'api.yaml') default_handlers = [ - (r"/api", APIHandler), + (r"/api", APIHandler) ]