我收到了这个错误:
[Mon Apr 22 23:45:42 2013] [error] [client 192.168.1.88] mod_wsgi (pid=19481): Exception occurred processing WSGI script '/home/projects/treeio/treeio.wsgi'.
[Mon Apr 22 23:45:42 2013] [error] [client 192.168.1.88] Traceback (most recent call last):
[Mon Apr 22 23:45:42 2013] [error] [client 192.168.1.88] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 236, in __call__
[Mon Apr 22 23:45:42 2013] [error] [client 192.168.1.88] self.load_middleware()
[Mon Apr 22 23:45:42 2013] [error] [client 192.168.1.88] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 53, in load_middleware
[Mon Apr 22 23:45:42 2013] [error] [client 192.168.1.88] raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Mon Apr 22 23:45:42 2013] [error] [client 192.168.1.88] ImproperlyConfigured: Error importing middleware treeio.core.middleware.user: "No module named csrf.middleware"
我有 Django 1.5.1 和 Python 2.7.3。我正在尝试安装 Tree.io。
有什么建议吗?
编辑:
MIDDLEWARE_CLASSES = (
'johnny.middleware.LocalStoreClearMiddleware',
'johnny.middleware.QueryCacheMiddleware',
'django.middleware.gzip.GZipMiddleware',
'treeio.core.middleware.domain.DomainMiddleware',
'treeio.core.middleware.user.SSLMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'treeio.core.middleware.user.AuthMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'treeio.core.middleware.chat.ChatAjaxMiddleware',
"django.contrib.messages.middleware.MessageMiddleware",
"treeio.core.middleware.modules.ModuleDetect",
"minidetector.Middleware",
"treeio.core.middleware.user.CommonMiddleware",
"treeio.core.middleware.user.PopupMiddleware",
"treeio.core.middleware.user.LanguageMiddleware",)
SO:Ubuntu 12.04.2 LTS