Commit 0debd13c authored by Iliya Manolov's avatar Iliya Manolov

fixup! jupyter: Replace ipython_notebook with jupyter SR

parent 4249ad1a
......@@ -16,7 +16,7 @@
[instance-jupyter-notebook]
filename = instance.cfg.in
md5sum = f0abfc788f6a83773d07dd37f9728db0
md5sum = 9c2d41e611b1fd75e87a985726adf513
[jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja
......@@ -24,7 +24,7 @@ md5sum = 720e90a829c63371696bc3009917a743
[jupyter-set-password]
filename = jupyter_set_password.cgi.jinja
md5sum = d7d4a7e19d55bf14007819258bf42100
md5sum = b8d31441780b524a7e52d1710dd78385
[erp5-kernel]
filename = ERP5kernel.py.jinja
......@@ -36,4 +36,4 @@ md5sum = ab6e78ea20855e07d388b5b86d1770fe
[custom-js]
filename = custom.js.jinja
md5sum = 584aa839aa20263ba885537b74c83abd
md5sum = 0bf9e2eb1718b14307265fe05a167018
......@@ -81,8 +81,8 @@
* @static
*/
$([IPython.events]).on('notebook_loaded.Notebook', function(){
var kernelname = IPython.notebook.kernel_selector.current_selection;
$([jupyter.events]).on('notebook_loaded.Notebook', function(){
var kernelname = jupyter.notebook.kernel_selector.current_selection;
var display_text="<div class='output_subarea output_text output_result'>\
<pre>Follow these steps to customize your notebook with ERP5 kernel :-</br>\
1. Make sure you have 'erp5_data_notebook' business template installed in your ERP5</br>\
......
......@@ -24,16 +24,16 @@ if not os.path.exists(config_file):
parser = ConfigParser.ConfigParser()
parser.read(config_file)
if not parser.has_section("ipython_notebook"):
parser.add_section("ipython_notebook")
if not parser.has_section("jupyter_notebook"):
parser.add_section("jupyter_notebook")
if not parser.has_option("ipython_notebook", "password"):
parser.set("ipython_notebook", "password", "")
if not parser.has_option("jupyter_notebook", "password"):
parser.set("jupyter_notebook", "password", "")
if "password" in form:
parser.set("ipython_notebook", "password", passwd(form["password"].value))
parser.set("jupyter_notebook", "password", passwd(form["password"].value))
# subprocess.call('{{ httpd_graceful }}')
# TODO: we should restart ipython
# TODO: we should restart jupyter
with open(config_file, 'w') as file:
parser.write(file)
......@@ -43,7 +43,7 @@ print "<html><head>"
print "<link rel=\"stylesheet\" href=\"static/pure-min.css\">"
print "<link rel=\"stylesheet\" href=\"static/style.css\">"
print "</head><body>"
print "<h1>IPython Notebook Password :</h1>"
print "<h1>Jupyter Notebook Password :</h1>"
print "<form action=\"/index.cgi\" method=\"post\" class=\"pure-form-aligned\">"
print "<input type=\"hidden\" name=\"posting-script\" value=\"{{ pwd }}/{{ this_file }}\">"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment