Python 3.4 Django 1.8 Python任何地方配置不当

Python 3.4 Django 1.8 PythonAnywhere ImproperlyConfigured

正在尝试在 pythonanywhere 上部署我的项目。

wsgi配置文件

import os
import sys
path = '/home/GriMel/TwDTutor'
if path not in sys.path:
    sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'TwDTutor.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

静态文件

/static/admin   /home/GriMel/.virtualenvs/rango/lib/python3.4/site-packages/django/contrib/admin/static/admin
/static/    /home/GriMel/TwDTutor/rango/static

得到错误

django.core.exceptions.ImproperlyConfigured: Module "django.contrib.auth.middleware" does not define a "SessionAuthenticationMiddleware" attribute/class

该错误通常表示 Django 版本不匹配,因此您可能没有在 Web 应用程序选项卡上正确设置 virtualenv。