Django manage.py wrapper won't back down

It seems that I came across some strange error, or rather, some setting that I am not familiar with my system that does not allow me to insert a tab when I am in the Django shell ( python manage.py shellas I launch it).

For obvious reasons, this turns out to be annoying since I cannot do any loops or conditonals in the shell. If I clicked tab, it will execute all the functions available to me, for example bash in the terminal. I tried using spaces for my indentation, but always get indented error.

Does anyone know why this is happening and what can I do to tabwork again in my shell? (Perhaps it is important to know that this applies to the Ubuntu 9.04 system).

Edit: It tabworks fine in the regular pythong shell, but only in django, that it is not.

Thank.

+3
source share
1 answer

I usually assume that at startup pythonit calls something like ipythonbecause the normal stock interpreter does not perform tabs. It should automatically pick up ipython and use it though . Try to run a simple python interpreter (just run pythonon the command line) and run

import IPython

If you can do this, manage.pyshould use ipython. If not, maybe reinstall ipython, as it turns out that the module was ipythonnot installed correctly.

+2
source

Source: https://habr.com/ru/post/1746465/


All Articles