how to run django in jupyter

  1. First, install the django-extensions package by running the command pip install django-extensions.

  2. Add 'django_extensions' to your INSTALLED_APPS in the settings.py file of your Django project.

  3. Next, run the following command in your terminal to create a new Jupyter notebook: python manage.py shell_plus --notebook.

  4. This command will start a Jupyter notebook server and open a new tab in your web browser with access to your Django project's models, settings, and configurations.

  5. You can now start writing and running Python code that interacts with your Django project within the Jupyter notebook interface.