In my last story, I related how to install a kernel in a virtual environment in order to run Jupyter from there.
This was a necessary step to run Django in Jupyter Notebook
So now to run Django, we need to set a few more things
In the Notebook, we need to initialize Django this way:
import os# this environment variable points to the 'settings' module
# in the Django app.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")# maybe not be necessary if you hard coded you DB URL in settings,
# but mine it pulled from the DATABASE_URL environment variable
"postgres://localhost:5432/db")# and then...