How to enable history in Django shell in python

centos, django, python

Solution

You could use bpython it has history enabled and many other fantastic features, if you are using virtualenv install it with pip.

pip install bpython

or globally

apt-get install bpython

For me this is the most amazing interactive shell for python.

Problem

I am using `shell_plus` for my Django shell. The `readline` and `rlcompleter` modules are installed there. But I find that when I close my `shell_plus` session, I can return to the history commands I used in previous sessions. In my office, I can go back to previous commands as well. what do I need to do for that?

Original source