DEV Community

Serhat Teker
Serhat Teker

Posted on • Originally published at tech.serhatteker.com on

How to Run Django Shell in IPython

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!

Top comments (0)