Django 1.4/1.5 compatibility
Merge Django 1.4 upgrade