disable download-as-pt

since it doesn't work. Adds a note about nbconvert needed to bring it back.
This commit is contained in:
MinRK 2013-10-08 17:42:46 -07:00
parent d089f7749f
commit 4a12890d65
3 changed files with 11 additions and 4 deletions

View File

@ -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

View File

@ -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();
});

View File

@ -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>