mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
disable download-as-pt
since it doesn't work. Adds a note about nbconvert needed to bring it back.
This commit is contained in:
parent
d089f7749f
commit
4a12890d65
@ -69,9 +69,9 @@ class NotebookHandler(IPythonHandler):
|
||||
|
||||
if self.get_argument('download', default='False') == 'True':
|
||||
format = self.get_argument('format', default='json')
|
||||
if format == u'json':
|
||||
if format != u'json':
|
||||
self.set_header('Content-Type', 'application/json')
|
||||
raise web.HTTPError(400, "Unrecognized format: %s" % ext)
|
||||
raise web.HTTPError(400, "Unrecognized format: %s" % format)
|
||||
|
||||
self.set_header('Content-Disposition',
|
||||
'attachment; filename="%s"' % name
|
||||
|
@ -101,6 +101,10 @@ var IPython = (function (IPython) {
|
||||
);
|
||||
window.location.assign(url);
|
||||
});
|
||||
|
||||
/* FIXME: download-as-py doesn't work right now
|
||||
* We will need nbconvert hooked up to get this back
|
||||
|
||||
this.element.find('#download_py').click(function () {
|
||||
var notebook_name = IPython.notebook.get_notebook_name();
|
||||
if (IPython.notebook.dirty) {
|
||||
@ -114,6 +118,9 @@ var IPython = (function (IPython) {
|
||||
);
|
||||
window.location.assign(url);
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
this.element.find('#rename_notebook').click(function () {
|
||||
IPython.save_widget.rename_notebook();
|
||||
});
|
||||
|
@ -73,8 +73,8 @@ class="notebook_app"
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-submenu"><a href="#">Download as</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li id="download_ipynb"><a href="#">IPython (.ipynb)</a></li>
|
||||
<li id="download_py"><a href="#">Python (.py)</a></li>
|
||||
<li id="download_ipynb"><a href="#">IPython Notebook (.ipynb)</a></li>
|
||||
<!-- <li id="download_py"><a href="#">Python (.py)</a></li> -->
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
|
Loading…
Reference in New Issue
Block a user