6

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.

4 Answers4

8

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

vinay kumar
  • 583
  • 6
  • 18
3

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

django-admin shell

Or

python manage.py shell
JoseKilo
  • 2,343
  • 1
  • 16
  • 28
0

root the django project then python manage.py shell do the views actions here.

Cadmus
  • 665
  • 7
  • 13
0

You also can use a pydev console in PyCharm, which can load anything you want, if you set up it in PyCharm's preferences.

Mine is here:

/Users/waryak/.virtualenvs/python3.8_django/bin/python3.8 /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py --mode=client --port=49852
Ladenkov Vladislav
  • 1,247
  • 2
  • 21
  • 45