Merge pull request #3225 from ellisonbg/removerst

Removing old restuctured text handler and web service, that are completely unused.
Fernando Perez 13 years ago
commit 44f74c9ad2

@ -737,35 +737,9 @@ class ClusterActionHandler(IPythonHandler):
#-----------------------------------------------------------------------------
# RST web service handlers
# File handler
#-----------------------------------------------------------------------------
class RSTHandler(IPythonHandler):
@web.authenticated
def post(self):
if publish_string is None:
raise web.HTTPError(503, u'docutils not available')
body = self.request.body.strip()
source = body
# template_path=os.path.join(os.path.dirname(__file__), u'templates', u'rst_template.html')
defaults = {'file_insertion_enabled': 0,
'raw_enabled': 0,
'_disable_config': 1,
'stylesheet_path': 0
# 'template': template_path
}
try:
html = publish_string(source, writer_name='html',
settings_overrides=defaults
)
except:
raise web.HTTPError(400, u'Invalid RST')
print html
self.set_header('Content-Type', 'text/html')
self.finish(html)
# to minimize subclass changes:
HTTPError = web.HTTPError

@ -68,7 +68,7 @@ from .handlers import (LoginHandler, LogoutHandler,
ProjectDashboardHandler, NewHandler, NamedNotebookHandler,
MainKernelHandler, KernelHandler, KernelActionHandler, IOPubHandler, StdinHandler,
ShellHandler, NotebookRootHandler, NotebookHandler, NotebookCopyHandler,
RSTHandler, AuthenticatedFileHandler, PrintNotebookHandler,
AuthenticatedFileHandler, PrintNotebookHandler,
MainClusterHandler, ClusterProfileHandler, ClusterActionHandler,
FileFindHandler, NotebookRedirectHandler,
)
@ -163,7 +163,6 @@ class NotebookWebApplication(web.Application):
(r"/kernels/%s/stdin" % _kernel_id_regex, StdinHandler),
(r"/notebooks", NotebookRootHandler),
(r"/notebooks/%s" % _notebook_id_regex, NotebookHandler),
(r"/rstservice/render", RSTHandler),
(r"/files/(.*)", AuthenticatedFileHandler, {'path' : notebook_manager.notebook_dir}),
(r"/clusters", MainClusterHandler),
(r"/clusters/%s/%s" % (_profile_regex, _cluster_action_regex), ClusterActionHandler),

Loading…
Cancel
Save