You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
906 B
31 lines
906 B
"""Tornado handlers for the tree view."""
|
|
|
|
# Copyright (c) Jupyter Development Team.
|
|
# Distributed under the terms of the Modified BSD License.
|
|
|
|
import os
|
|
from tornado import web
|
|
from ..base.handlers import IPythonHandler, FileFindHandler
|
|
|
|
|
|
class LabHandler(IPythonHandler):
|
|
|
|
"""Render the Jupyter Lab View."""
|
|
|
|
@web.authenticated
|
|
def get(self):
|
|
self.write(self.render_template('lab.html',
|
|
page_title='Jupyter Lab',
|
|
terminals_available=self.settings['terminals_available'],
|
|
mathjax_url=self.mathjax_url))
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# URL to handler mappings
|
|
#-----------------------------------------------------------------------------
|
|
|
|
default_handlers = [
|
|
(r"/lab", LabHandler),
|
|
(r"/lab/(.*)", FileFindHandler,
|
|
{'path': os.path.join(os.path.dirname(__file__), 'build')}),
|
|
]
|