##// END OF EJS Templates
Merge pull request #6649 from minrk/302-notebooks...
Matthias Bussonnier -
r18266:8f262d49 merge
parent child Browse files
Show More
@@ -270,6 +270,22 b' class ModifyCheckpointsHandler(IPythonHandler):'
270 self.set_status(204)
270 self.set_status(204)
271 self.finish()
271 self.finish()
272
272
273
274 class NotebooksRedirectHandler(IPythonHandler):
275 """Redirect /api/notebooks to /api/contents"""
276 SUPPORTED_METHODS = ('GET', 'PUT', 'PATCH', 'POST', 'DELETE')
277
278 def get(self, path):
279 self.log.warn("/api/notebooks is deprecated, use /api/contents")
280 self.redirect(url_path_join(
281 self.base_url,
282 'api/contents',
283 path
284 ))
285
286 put = patch = post = delete = get
287
288
273 #-----------------------------------------------------------------------------
289 #-----------------------------------------------------------------------------
274 # URL to handler mappings
290 # URL to handler mappings
275 #-----------------------------------------------------------------------------
291 #-----------------------------------------------------------------------------
@@ -283,4 +299,5 b' default_handlers = ['
283 ModifyCheckpointsHandler),
299 ModifyCheckpointsHandler),
284 (r"/api/contents%s" % file_path_regex, ContentsHandler),
300 (r"/api/contents%s" % file_path_regex, ContentsHandler),
285 (r"/api/contents%s" % path_regex, ContentsHandler),
301 (r"/api/contents%s" % path_regex, ContentsHandler),
302 (r"/api/notebooks/?(.*)", NotebooksRedirectHandler),
286 ]
303 ]
General Comments 0
You need to be logged in to leave comments. Login now