Skip to content

Instantly share code, notes, and snippets.

@BYK
Last active September 6, 2024 17:46
Show Gist options
  • Save BYK/e7e68ec08184345c7a5406e95ec25329 to your computer and use it in GitHub Desktop.
Save BYK/e7e68ec08184345c7a5406e95ec25329 to your computer and use it in GitHub Desktop.
Django Shell in VS Code w/ Jupyter

Django Shell in VS Code Jupyter

VS Code Install

Install Jupyter extension (vs code)

PIP Install

Install ipykernel Install notebook install django_extensions

Config

Add django_extensions to settings.py -> INSTALLED_APPS

jupyter notebook --generate-config

Add c.IdentityProvider.token = "" to the generated file

Run

Run DJANGO_ALLOW_ASYNC_UNSAFE=1 ./manage.py shell_plus --lab --no-browser

In VS Code

CMD + P

  1. >Jupyter: Create new notebook
  2. Select Kernel
  3. Existing kernel: http://127.0.0.1:8888/lab
  4. Name: Django shell

Profit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment