Django 1.5/1.6 compatibility