Fix TypeError in Django 1.7 admin