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
📢 แจ้งเตือน: serhatteker/how to run django shell in ipython mbj - Kapook Update 2025 📢 แจ้งเตือน: serhatteker/how to run django shell in ipython mbj - Kapook Update 2025

Then simply run:

$ python manage.py shell -i ipython
📢 แจ้งเตือน: serhatteker/how to run django shell in ipython mbj - Kapook Update 2025 📢 แจ้งเตือน: serhatteker/how to run django shell in ipython mbj - Kapook Update 2025

That's all. The -i option argument

 --interface {ipython,bpython,python}, -i {ipython,bpython,python}
📢 แจ้งเตือน: serhatteker/how to run django shell in ipython mbj - Kapook Update 2025 📢 แจ้งเตือน: serhatteker/how to run django shell in ipython mbj - Kapook Update 2025

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)