Fix errors in contrib.django.tasks