Interactive shell django environment in docker

Interactive shell django environment in docker

Troubleshooting your django app from inside docker container:

If the container is running:

docker exec -it [containerID] /bin/bash
python manage.py shell
from [yourapp].models import [class]

If the container is not running:

docker exec -it [containerID] /bin/bash
python manage.py shell
from [yourapp].models import [class]