I am using the following command to run an ipython notebook server with django:
./manage.py shell_plus --notebook
The server functions as expected. However, I would like to set the port and not launch a browser when starting the server.
If I were running an IPython notebook server without django I successfully use the following:
ipython notebook --port=9999 --no-browser
I checked the documentation here and tried setting the options using
IPYTHON_ARGUMENTS = [
'--ext', 'django_extensions.management.notebook_extension',
'--port=9999',
'--no-browser,
]
These arguments are loaded after the server has already started and do not change the notebook server settings from what I can gather.
How can I set the notebook server settings when launching the notebook server with django using
./manage.py shell_plus --notebook
?
Thank you in advance.
To explore your Django models in Jupyter Notebook, you can use the following setup. Then, I usually add DJANGO_ALLOW_ASYNC_UNSAFE to debug locally. Not recommended on production databases.
Django Extensions is a collection of custom extensions for the Django Framework. These include management commands, additional database fields, admin extensions and much more.
Running the latest version of IPython (4.2.0), I had to add this to settings.py
:
NOTEBOOK_ARGUMENTS = [
# exposes IP and port
'--ip=0.0.0.0',
'--port=8888',
# disables the browser
'--no-browser',
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With