Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Use `ipython` shell with Django
- Ordinary Django shell
- ```bash
- $ 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:
- ```bash
- $ export DJANGO_SETTINGS_MODULE=mysite.settings
- ```
- then launch `ipython` and wire in django:
- ```ipython
- In [1]: import django
- In [2]: django.setup()
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement