在stackoverflow找到了解决方案:
To resolve this go to settings.py where there is new-style MIDDLEWARE (introduced in Django 1.10)
settings.py
MIDDLEWARE
Change that to old-style MIDDLEWARE_CLASSES
MIDDLEWARE_CLASSES
https://docs.djangoproject.com/en/stable/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware