Fix import for newer versions of Django