Migrating from Python 2.5 to 2.7 and Django 0.96 to 1.2; partially tested.