Update for moder versions of Django.