Question

I have ipython installed, I want to run a plain python interpreter instead with manage.py shell.

So I try,

python2.5 manage.py shell --plain

Which gave me an error, and text which suggest that --plain was passed to ipython

So I read, http://docs.djangoproject.com/en/dev/ref/django-admin/

which suggets

django-admin.py shell --plain

Which gives me

Error: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

Which seem the correct thing for it to do.

What am I mising here? [Ubuntu Jaunty, django.VERSION = (1, 2, 0, 'alpha', 0), python 2.5 and 2.6]

Was it helpful?

Solution

If the reason you want to use python's interpretor over iPython's is because you need to paste the doc tests, you can try typing

%doctest_mode

in the ipython console instead

In [1]: %doctest_mode
*** Pasting of code with ">>>" or "..." has been enabled.
Exception reporting mode: Plain
Doctest mode is: ON
>>> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top