Local Development & Debugging#
Running the local development servers#
This app uses webpack to compile/transpile assets. The app is equipped to be served from 127.0.0.1:8000 or localhost:8000.
First run the python server:
./manage.py runserver_plus
Then in a new tab, run the vite server:
npm run dev
Debugging#
To access a python shell pre-populated with Django models and local env:
./manage.py shell_plus
To add a breakpoint in your python code, add the following code to your .bashrc or .zshrc:
export PYTHONBREAKPOINT="pudb.set_trace"
Then add the following to your python code:
breakpoint()
If the above fails or you prefer a more immediate solution, you can add the following to your code:
import pudb; pu.db