DEV Community

Mohamed M El-Kalioby
Mohamed M El-Kalioby

Posted on

Easiest Django Shell/Terminal

Django shell is a great tool to interact with Models over the terminal, but bpython is a better solution because of the autocomplete feature that makes someone's life much easier. However, bpython doesn't handle Django models in a smart way, for example if you try a filter() method, it won't allow you to autocomplete parameters using the class members,as the function has **kwargs as the function fingerprint.

So, in this article, we will discuss bpython-django a fork from bpython that handles Django in a better way, currently it handles Models and can be extended as desired.

bpython-django

Install

pip install bpython-django

Start your django shell

After the module is installed, you start you shell by
python manage.py shell -i bpython
or

python manage.py shell

Use the shell as you wish, as shown in next asciienma

Comments

You can always check with developer regarding any issues, bugs or new features at

GitHub logo mkalioby / bpython-django

bpython-django - Better Integration with Django for the famous bpython REPL

Latest comments (0)