django shell not respecting vi editing-mode in .inputrc

63 views
Skip to first unread message

Michael Scheper

unread,
Dec 4, 2014, 9:39:26 PM12/4/14
to django...@googlegroups.com
G'day peeps,

I somehow missed the Django shell (python manage.py shell) until somebody quite new to Django showed it to me. It's pretty and seems to have some nice tricks, but the vi editing commands I expect aren't working when I run it in my own environment.

The normal Python interpreter uses readline, and thus respects 'set editing-mode vi' (and other settings) in my ~/.inputrc file. Can I get the Django shell to do the same, or do I just need to type django.setup() in the normal interpreter?

Thanks,
Michael Scheper.

Collin Anderson

unread,
Dec 5, 2014, 10:08:52 PM12/5/14
to django...@googlegroups.com, dja...@michaelscheper.com
Hi,

manage.py shell is either going to use the regular python shell or IPython under the hood. You could try manage.py shell --plain to see using the regular shell works if you're getting IPython.

If nothing else it looks like you might be able to do ctrl+alt+j to switch to vi mode.

Collin
Reply all
Reply to author
Forward
0 new messages