Adrian Andreias

Feb 20, 2014

Django shell magically auto-importing and auto-completing

Getting tired of writing log import lines in Django shell (from myapp.path.models import SomeModel)?

Switching between your code, documentation and Django shell way too often?

Buy this toothbrush and all your worries... uh... no, I mean there's something way smarter than hard working (or typing), it's called django-extensions. Once your run python shell_plus it will auto-import all your models and some more useful stuff and you get auto-complete (requires pip install ipython). django-extensiosn can do a lot more. Here's a short intro video: and the docs.