Changes for update to Django 1.6.