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.

0

4 Answers 4

9

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

Sign up to request clarification or add additional context in comments.

1 Comment

you can use ptpython with this and that is so cool; just like python manage.py shell_plus --ptpython
4

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

django-admin shell

Or

python manage.py shell

2 Comments

Sorry, this is not answer my question.
Not answer to question.
1

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

1 Comment

Sorry, this is not answer my question.
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

Comments