I just tried to install the django-debug-toolbar. I believe I followed all the steps as indicated in the docs. I am using docker, so I included the following in my settings:
if os.environ.get('DEBUG'):
import socket
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS = [ip[: ip.rfind(".")] + ".1" for ip in ips] + ["127.0.0.1", "10.0.2.2"]
After installing, I ran docker-compose build
then docker-compose up -d
. docker-compose logs
and docker-compose exec web python manage.py collectstatic
show the error
ModuleNotFoundError: No module named 'debug-toolbar'
The only thing I think I did differently from the docs is that I use pipenv. I exited docker-compose and then installed via pipenv install django-debug-toolbar
. Debug toolbar is in my pipfile
.
I'm never sure if I'm supposed to exit docker-compose before install a module via pipenv (or if it matters). I also tried installed via docker-compose exec web pipenv install django-debug-toolbar
, shut down the container, then docker-compose up -d --build
but the module not found error is still there.