Fix for newer django version