diff --git a/docs/source/whatsnew/development.rst b/docs/source/whatsnew/development.rst index 87b41c5..0d74198 100644 --- a/docs/source/whatsnew/development.rst +++ b/docs/source/whatsnew/development.rst @@ -121,6 +121,58 @@ Other new features or :file:`/usr/local/etc/ipython` on Unix systems, or :file:`{%PROGRAMDATA%}\\ipython` on Windows. +* Added support for configurable user-supplied `Jinja + `_ HTML templates for the notebook. Paths to + directories containing template files can be specified via + ``NotebookApp.extra_template_paths``. User-supplied template directories + searched first by the notebook, making it possible to replace existing + templates with your own files. + + For example, to replace the notebook's built-in ``error.html`` with your own, + create a directory like ``/home/my_templates`` and put your override template + at ``/home/my_templates/error.html``. To start the notebook with your custom + error page enabled, you would run:: + + ipython notebook '--extra_template_paths=["/home/my_templates/"]' + + It's also possible to override a template while also `inheriting + `_ from that + template, by prepending ``templates/`` to the ``{% extends %}`` target of + your child template. This is useful when you only want to override a + specific block of a template. For example, to add additional CSS to the + built-in ``error.html``, you might create an override that looks like:: + + {% extends "templates/error.html" %} + + {% block stylesheet %} + {{super()}} + + {% endblock %} + +* Added a widget persistence API. This allows you to persist your notebooks interactive widgets. + Two levels of control are provided: + 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. + 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. + + Example code for persisting your widget state to session data:: + + %%javascript + require(['widgets/js/manager'], function(manager) { + manager.WidgetManager.set_state_callbacks(function() { // Load + return JSON.parse(sessionStorage.widgets_state || '{}'); + }, function(state) { // Save + sessionStorage.widgets_state = JSON.stringify(state); + }); + }); + +* Enhanced support for :magic:`env` magic. As before, :magic:`env` with no + arguments displays all environment variables and values. Additionally, + :magic:`env` can be used to get or set individual environment variables. To + display an individual value, use the `%env var` syntax. To set a value, use + `env var val` or `env var=val`. Python value expansion using `$` works as usual. + .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. @@ -178,6 +230,10 @@ Backwards incompatible changes box in the web browser. A new FlexBox widget was added, which allows you to use the flexible box model. +* The notebook now uses a single websocket at `/kernels//channels` instead of separate + `/kernels//{shell|iopub|stdin}` channels. Messages on each channel are identified by a + `channel` key in the message dict, for both send and recv. + .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. Content Security Policy diff --git a/docs/source/whatsnew/pr/env_magic.rst b/docs/source/whatsnew/pr/env_magic.rst deleted file mode 100644 index 7234471..0000000 --- a/docs/source/whatsnew/pr/env_magic.rst +++ /dev/null @@ -1 +0,0 @@ -* Enhanced support for `env` magic. As before, `env` with no arguments displays all environment variables and values. Additionally, `env` can be used to get or set individual environment variables. To display an individual value, use the `env var` syntax. To set a value, use `env var val` or `env var=val`. Python value expansion using `$` works as usual. diff --git a/docs/source/whatsnew/pr/incompat-single-websocket.rst b/docs/source/whatsnew/pr/incompat-single-websocket.rst deleted file mode 100644 index b4d6730..0000000 --- a/docs/source/whatsnew/pr/incompat-single-websocket.rst +++ /dev/null @@ -1,3 +0,0 @@ -* The notebook now uses a single websocket at `/kernels//channels` instead of separate - `/kernels//{shell|iopub|stdin}` channels. Messages on each channel are identified by a - `channel` key in the message dict, for both send and recv. diff --git a/docs/source/whatsnew/pr/persistence-api-feature.rst b/docs/source/whatsnew/pr/persistence-api-feature.rst deleted file mode 100644 index 9a476a0..0000000 --- a/docs/source/whatsnew/pr/persistence-api-feature.rst +++ /dev/null @@ -1,16 +0,0 @@ -* Added a widget persistence API. This allows you to persist your notebooks interactive widgets. - Two levels of control are provided: - 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. - 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. - - Example code for persisting your widget state to session data: - - :: - %%javascript - require(['widgets/js/manager'], function(manager) { - manager.WidgetManager.set_state_callbacks(function() { // Load - return JSON.parse(sessionStorage.widgets_state || '{}'); - }, function(state) { // Save - sessionStorage.widgets_state = JSON.stringify(state); - }); - }); \ No newline at end of file diff --git a/docs/source/whatsnew/pr/user-templates.rst b/docs/source/whatsnew/pr/user-templates.rst deleted file mode 100644 index 54a6927..0000000 --- a/docs/source/whatsnew/pr/user-templates.rst +++ /dev/null @@ -1,29 +0,0 @@ -* Added support for configurable user-supplied `Jinja - `_ HTML templates for the notebook. Paths to - directories containing template files can be specified via - ``NotebookApp.extra_template_paths``. User-supplied template directories - searched first by the notebook, making it possible to replace existing - templates with your own files. - - For example, to replace the notebook's built-in ``error.html`` with your own, - create a directory like ``/home/my_templates`` and put your override template - at ``/home/my_templates/error.html``. To start the notebook with your custom - error page enabled, you would run:: - - ipython notebook '--extra_template_paths=["/home/my_templates/"]' - - It's also possible to override a template while also `inheriting - `_ from that - template, by prepending ``templates/`` to the ``{% extends %}`` target of - your child template. This is useful when you only want to override a - specific block of a template. For example, to add additional CSS to the - built-in ``error.html``, you might create an override that looks like:: - - {% extends "templates/error.html" %} - - {% block stylesheet %} - {{super()}} - - {% endblock %}