Ordinary Django shell
$ python manage.py shell
does not do autocompletion, doc pretty-printing or other nice-to-have-things.
A way around this is using the ipython
shell.
We'll assume that both django
and ipython
are installed (in an active virtualenv
),
and that the django project in question is called mysite
(e.g. made via $ django-admin startproject mysite
).
1st set up the environment:
$ export DJANGO_SETTINGS_MODULE=mysite.settings
then launch ipython
and wire in django:
In [1]: import django
In [2]: django.setup()