我的所有应用程序都遇到了这个问题,昨天一切正常!
mayke@mayke-notebook:~/$ python manage.py runserver
Validating models...
0 errors found
January 05, 2015 - 17:41:52
Django version 1.6.1, using settings 'Teste.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
好的,是一个新项目,一切正常,但是当我尝试访问时,我在浏览器中收到以下错误:
A server error occurred. Please contact the administrator.
以下堆栈跟踪在终端
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response)
File "/usr/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__ return self.application(environ, start_response)
File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 187, in __call__ self.load_middleware()
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 45, in load_middleware mw_class = import_by_path(middleware_path)
File "/usr/lib/python2.7/dist-packages/django/utils/module_loading.py", line 31, in mport_by_path error_prefix, module_path, class_name))
ImproperlyConfigured: Module "django.contrib.auth.middleware" does not define a SessionAuthenticationMiddleware" attribute/class
[05/Jan/2015 17:45:19] "GET / HTTP/1.1" 500 59 Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response)
File "/usr/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__ return self.application(environ, start_response)
File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 187, in __call__ self.load_middleware()
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 45, in load_middleware mw_class = import_by_path(middleware_path)
File "/usr/lib/python2.7/dist-packages/django/utils/module_loading.py", line 31, in import_by_path error_prefix, module_path, class_name))
ImproperlyConfigured: Module "django.contrib.auth.middleware" does not define a SessionAuthenticationMiddleware" attribute/class