尝试在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
答案 0 :(得分:1)
该错误通常表明Django版本不匹配,因此您可能没有在Web应用程序选项卡上正确设置virtualenv。