Django 1.5 compatibility
Merge Django 1.4 upgrade