Living on the Edge

Autoloading Your Models

Posted on January 09, 2008

Peter Sheats mentioned today in the #django IRC channel that he wrote a script to autoload his installed application models automatically in the shell. This is something that I’ve had on my todo list for some time. All the importing when I’m trying to quickly test out something small in the shell can get quite cumbersome.

Peter’s approach is a short and nifty piece of code. Check it out and save yourself a lot of typing. Now I owe Peter a beer.