【问题标题】:Python 3.4 Django 1.8 PythonAnywhere ImproperlyConfiguredPython 3.4 Django 1.8 PythonAnywhere 配置不当
【发布时间】:2016-03-07 06:21:08
【问题描述】:

尝试在 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

【问题讨论】:

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


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-10-21
      • 2015-09-06
      • 2015-08-27
      • 1970-01-01
      • 2016-03-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多