Python 3.4 Django 1.8 PythonAnywhere配置不正确

时间:2015-12-02 20:30:32

标签: python django python-3.x django-1.8 pythonanywhere

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

  • python3.4
  • Django 1.8.7
  • 用户名 - GriMel
  • 项目名称 - TwDTutor

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

1 个答案:

答案 0 :(得分:1)

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