问题描述:
本机django1.7.1,服务器django1.6.4版本 + Apache + wsgi部署,出现500页面,检查Apache error.log发现:
ImproperlyConfigured: Module "django.contrib.auth.middleware" does not define a "SessionAuthenticationMiddleware" attribute/class"
查阅资料SessionAuthenticationMiddleware是django1.7中的特性
方法一:
升级到django1.7
sudo pip install django
查询当前版本
python -c "import django; print(django.get_version())"
方法二:
在settings.py中MIDDLEWARE_CLASSES处注释掉SessionAuthenticationMiddleware