В джанго новичок.
1) В системе две версии Питона. 2.6 и 2.7
2) Создал окружение (virtualenvs) указав версию питона 2.7
3) всё окружение успешно установилось
4) без проблем в окружение добавил Djnago
Django.wsgi
#/usr/bin/python2.7
#coding: utf-8
import os
import sys
PROJECT_ROOT = os.path.dirname(__file__)
PYTHON_LIBS = '/home/adko/.virtualenvs/test/lib/python2.7/site-packages'
sys.path.extend((PROJECT_ROOT,PYTHON_LIBS,os.path.dirname(PROJECT_ROOT)))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
В итоге такая ошибка:
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] mod_wsgi (pid=15554): Exception occurred processing WSGI script '/home/adko/projects/test/django.wsgi'.
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] Traceback (most recent call last):
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 250, in __call__
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] self.load_middleware()
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 51, in load_middleware
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] raise exceptions.ImproperlyConfigured('Middleware module "%s" does not define a "%s" class' % (mw_module, mw_classname))
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] ImproperlyConfigured: Middleware module "django.contrib.auth.middleware" does not define a "SessionAuthenticationMiddleware" class
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] mod_wsgi (pid=15553): Exception occurred processing WSGI script '/home/adko/projects/test/django.wsgi'.
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] Traceback (most recent call last):
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 250, in __call__
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] self.load_middleware()
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 51, in load_middleware
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] raise exceptions.ImproperlyConfigured('Middleware module "%s" does not define a "%s" class' % (mw_module, mw_classname))
[Tue Aug 04 06:23:48 2015] [error] [client 172.20.1.68] ImproperlyConfigured: Middleware module "django.contrib.auth.middleware" does not define a "SessionAuthenticationMiddleware" class