Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
0
venv/Lib/site-packages/notebook/edit/__init__.py
Normal file
0
venv/Lib/site-packages/notebook/edit/__init__.py
Normal file
Binary file not shown.
Binary file not shown.
29
venv/Lib/site-packages/notebook/edit/handlers.py
Normal file
29
venv/Lib/site-packages/notebook/edit/handlers.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
#encoding: utf-8
|
||||
"""Tornado handlers for the terminal emulator."""
|
||||
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
from tornado import web
|
||||
from ..base.handlers import IPythonHandler, path_regex
|
||||
from ..utils import url_escape
|
||||
|
||||
class EditorHandler(IPythonHandler):
|
||||
"""Render the text editor interface."""
|
||||
@web.authenticated
|
||||
def get(self, path):
|
||||
path = path.strip('/')
|
||||
if not self.contents_manager.file_exists(path):
|
||||
raise web.HTTPError(404, u'File does not exist: %s' % path)
|
||||
|
||||
basename = path.rsplit('/', 1)[-1]
|
||||
self.write(self.render_template('edit.html',
|
||||
file_path=url_escape(path),
|
||||
basename=basename,
|
||||
page_title=basename + " (editing)",
|
||||
)
|
||||
)
|
||||
|
||||
default_handlers = [
|
||||
(r"/edit%s" % path_regex, EditorHandler),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue