Last active
November 30, 2018 11:51
-
-
Save EtsuNDmA/05250379edd36834aa7e703bd0bfa338 to your computer and use it in GitHub Desktop.
Settings for Django kernel in Jupyter and JupyterLab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using Jupyter with Django | |
# Requires django_extensions | |
# For all settings see jupyter --help-all | |
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
try: | |
import jupyterlab | |
notebook_default_url = '/lab' # Using JupyterLab | |
except ImportError: | |
notebook_default_url = '/tree' # Using Jupyter | |
os.environ.setdefault('BROWSER', 'google-chrome') | |
NOTEBOOK_ARGUMENTS = [ | |
'--ip=0.0.0.0', | |
'--port=8888', | |
'--notebook-dir={}'.format(os.path.join(BASE_DIR, 'jupyter')), | |
# '--no-browser', | |
'--NotebookApp.token=<-verysecrettoken->', | |
'--NotebookApp.default_url={}'.format(notebook_default_url), | |
] | |
IPYTHON_KERNEL_DISPLAY_NAME = 'Django Kernel' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment