Changes to migrate to Django 1.7