DEV Community

loading...

How to Run Django Shell in IPython

serhatteker profile image Serhat Teker Originally published at tech.serhatteker.com on ・1 min read

First of all make sure you have installed IPython in your environment.

$ pip install ipython
Enter fullscreen mode Exit fullscreen mode

Then simply run:

$ python manage.py shell -i ipython
Enter fullscreen mode Exit fullscreen mode

That's all. The -i option argument

 --interface {ipython,bpython,python}, -i {ipython,bpython,python}
Enter fullscreen mode Exit fullscreen mode

specifies the shell to use. As we can see the options are ipython bpython or (plain) python.

By default, Django will use IPython or bpython if either is installed. If both are installed, specify which one you want like so.

For more info you can look at: django shell

All done!

Discussion (0)

pic
Editor guide