How to change django manage.py default shell

Viewed 919

I've just installed Anaconda and what's annoying that after executing:

python manage.py shell

The IPython shell is used. I'd like to change it back to default Python distribution. I'm using Visual Studio Code and already changed it interpreter to default python 3.6. Moreover the

python

command runs normal python distribution, and the problem exists both in Visual Studio and normal cmd terminal.

2 Answers

Django 1.10+:

python manage.py shell --interface python

Django < 1.10:

python manage.py shell --plain

i dont know if you have used shell_plus.

install django-extensions, then use python manage.py shell_plus

shell plus is a very great tool.

you can use shell / shell_plus to have a plain interface

python manage.py shell_plus --plain

Note:- its not recommended to use django-extension in prod versions. But i'm sure you would love shell_plus, as this would reduce the headache of importing all models.

Related