Interactive shell in Django

10,560

Solution 1

This command will help you to load all packages.

python manage.py shell_plus

Reference link http://django-extensions.readthedocs.io/en/latest/index.html

Solution 2

Try with https://docs.djangoproject.com/en/1.10/ref/django-admin/#shell

django-admin shell

Or

python manage.py shell
Share:
10,560
Admin
Author by

Admin

Updated on June 23, 2022

Comments

  • Admin
    Admin almost 2 years

    I would like to get an interactive shell with the code, but I don't even know if such thing exits. Could anyone be able to help me at this point?

    EDIT :

    I already know we could use python manage.py shell, but I would like something we could insert in the code in such a way we do not have to re-import all the libraries in the shell.

  • Admin
    Admin about 7 years
    Sorry, this is not answer my question.
  • Admin
    Admin about 7 years
    Sorry, this is not answer my question.
  • alexzander
    alexzander over 2 years
    you can use ptpython with this and that is so cool; just like python manage.py shell_plus --ptpython
  • coredumped0x
    coredumped0x over 2 years
    Not answer to question.