|
@@
-121,6
+121,58
b' Other new features'
|
|
121
|
or :file:`/usr/local/etc/ipython` on Unix systems,
|
|
121
|
or :file:`/usr/local/etc/ipython` on Unix systems,
|
|
122
|
or :file:`{%PROGRAMDATA%}\\ipython` on Windows.
|
|
122
|
or :file:`{%PROGRAMDATA%}\\ipython` on Windows.
|
|
123
|
|
|
123
|
|
|
|
|
|
124
|
* Added support for configurable user-supplied `Jinja
|
|
|
|
|
125
|
<http://jinja.pocoo.org/>`_ HTML templates for the notebook. Paths to
|
|
|
|
|
126
|
directories containing template files can be specified via
|
|
|
|
|
127
|
``NotebookApp.extra_template_paths``. User-supplied template directories
|
|
|
|
|
128
|
searched first by the notebook, making it possible to replace existing
|
|
|
|
|
129
|
templates with your own files.
|
|
|
|
|
130
|
|
|
|
|
|
131
|
For example, to replace the notebook's built-in ``error.html`` with your own,
|
|
|
|
|
132
|
create a directory like ``/home/my_templates`` and put your override template
|
|
|
|
|
133
|
at ``/home/my_templates/error.html``. To start the notebook with your custom
|
|
|
|
|
134
|
error page enabled, you would run::
|
|
|
|
|
135
|
|
|
|
|
|
136
|
ipython notebook '--extra_template_paths=["/home/my_templates/"]'
|
|
|
|
|
137
|
|
|
|
|
|
138
|
It's also possible to override a template while also `inheriting
|
|
|
|
|
139
|
<http://jinja.pocoo.org/docs/dev/templates/#template-inheritance>`_ from that
|
|
|
|
|
140
|
template, by prepending ``templates/`` to the ``{% extends %}`` target of
|
|
|
|
|
141
|
your child template. This is useful when you only want to override a
|
|
|
|
|
142
|
specific block of a template. For example, to add additional CSS to the
|
|
|
|
|
143
|
built-in ``error.html``, you might create an override that looks like::
|
|
|
|
|
144
|
|
|
|
|
|
145
|
{% extends "templates/error.html" %}
|
|
|
|
|
146
|
|
|
|
|
|
147
|
{% block stylesheet %}
|
|
|
|
|
148
|
{{super()}}
|
|
|
|
|
149
|
<style type="text/css">
|
|
|
|
|
150
|
/* My Awesome CSS */
|
|
|
|
|
151
|
</style>
|
|
|
|
|
152
|
{% endblock %}
|
|
|
|
|
153
|
|
|
|
|
|
154
|
* Added a widget persistence API. This allows you to persist your notebooks interactive widgets.
|
|
|
|
|
155
|
Two levels of control are provided:
|
|
|
|
|
156
|
1. Higher level- ``WidgetManager.set_state_callbacks`` allows you to register callbacks for loading and saving widget state. The callbacks you register are automatically called when necessary.
|
|
|
|
|
157
|
2. Lower level- the ``WidgetManager`` Javascript class now has ``get_state`` and ``set_state`` methods that allow you to get and set the state of the widget runtime.
|
|
|
|
|
158
|
|
|
|
|
|
159
|
Example code for persisting your widget state to session data::
|
|
|
|
|
160
|
|
|
|
|
|
161
|
%%javascript
|
|
|
|
|
162
|
require(['widgets/js/manager'], function(manager) {
|
|
|
|
|
163
|
manager.WidgetManager.set_state_callbacks(function() { // Load
|
|
|
|
|
164
|
return JSON.parse(sessionStorage.widgets_state || '{}');
|
|
|
|
|
165
|
}, function(state) { // Save
|
|
|
|
|
166
|
sessionStorage.widgets_state = JSON.stringify(state);
|
|
|
|
|
167
|
});
|
|
|
|
|
168
|
});
|
|
|
|
|
169
|
|
|
|
|
|
170
|
* Enhanced support for :magic:`env` magic. As before, :magic:`env` with no
|
|
|
|
|
171
|
arguments displays all environment variables and values. Additionally,
|
|
|
|
|
172
|
:magic:`env` can be used to get or set individual environment variables. To
|
|
|
|
|
173
|
display an individual value, use the `%env var` syntax. To set a value, use
|
|
|
|
|
174
|
`env var val` or `env var=val`. Python value expansion using `$` works as usual.
|
|
|
|
|
175
|
|
|
124
|
.. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
|
|
176
|
.. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
|
|
125
|
|
|
177
|
|
|
126
|
|
|
178
|
|
|
@@
-178,6
+230,10
b' Backwards incompatible changes'
|
|
178
|
box in the web browser. A new FlexBox widget was added, which allows you to
|
|
230
|
box in the web browser. A new FlexBox widget was added, which allows you to
|
|
179
|
use the flexible box model.
|
|
231
|
use the flexible box model.
|
|
180
|
|
|
232
|
|
|
|
|
|
233
|
* The notebook now uses a single websocket at `/kernels/<kernel-id>/channels` instead of separate
|
|
|
|
|
234
|
`/kernels/<kernel-id>/{shell|iopub|stdin}` channels. Messages on each channel are identified by a
|
|
|
|
|
235
|
`channel` key in the message dict, for both send and recv.
|
|
|
|
|
236
|
|
|
181
|
.. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
|
|
237
|
.. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
|
|
182
|
|
|
238
|
|
|
183
|
Content Security Policy
|
|
239
|
Content Security Policy
|