Major changes to support latest version of Django