Django shell mode in docker

I am learning how to develop a Django app in docker using this official tutorial: https://docs.docker.com/compose/django/

I successfully completed the tutorial and

docker-compose run web django-admin.py startproject composeexample .creates an image docker-compose uplaunches the application

The question arises:

I often use python manage.py shellto start Django in shell mode, but I do not know how to do this with docker.

+4
source share
1 answer
  • docker exec -it --user desired_user your_container bash
    , ssh - bash. Django manage.py.
  • python manage.py shell
+2

Source: https://habr.com/ru/post/1678995/


All Articles