From e416cb8658743c7dc44d8d627511c20ef6792dbc Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Sat, 27 Apr 2013 15:08:38 -0700 Subject: [PATCH] Removing old restuctured text handler and web service. --- IPython/frontend/html/notebook/handlers.py | 28 +------------------ IPython/frontend/html/notebook/notebookapp.py | 3 +- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/IPython/frontend/html/notebook/handlers.py b/IPython/frontend/html/notebook/handlers.py index d768df994..fdc3b4bdb 100644 --- a/IPython/frontend/html/notebook/handlers.py +++ b/IPython/frontend/html/notebook/handlers.py @@ -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 diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index fe9b26bd0..bbe593026 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -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),