我正试图让皮纳克斯在网络派系工作,有这么多的问题。。。[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] mod_wsgi (pid=22796): Exception occurred processing WSGI script '/home/pawesome/webapps/qtsocial/myproject.wsgi'.
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] Traceback (most recent call last):
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] File "/home/pawesome/webapps/qtsocial/lib/python2.6/django/core/handlers/wsgi.py", line 250, in __call__
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] self.load_middleware()
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] File "/home/pawesome/webapps/qtsocial/lib/python2.6/django/core/handlers/base.py", line 39, in load_middleware
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] for middleware_path in settings.MIDDLEWARE_CLASSES:
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] File "/home/pawesome/webapps/qtsocial/lib/python2.6/django/utils/functional.py", line 276, in __getattr__
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] self._setup()
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] File "/home/pawesome/webapps/qtsocial/lib/python2.6/django/conf/__init__.py", line 42, in _setup
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] self._wrapped = Settings(settings_module)
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] File "/home/pawesome/webapps/qtsocial/lib/python2.6/django/conf/__init__.py", line 89, in __init__
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
[Sun Feb 19 20:01:20 2012] [error] [client 127.0.0.1] ImportError: Could not import settings 'myproject.settings' (Is it on sys.path?): No module named pinax
《华尔街日报》:import os
import sys
from django.core.handlers.wsgi import WSGIHandler
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
application = WSGIHandler()
wsgi和myproject在同一个文件夹中,settings.py肯定在myproject中。那又有什么好处呢?
编辑:
好吧,所以我从这里以及从网络派别和wsgi现在看起来像这样的建议。。。import os
import sys
from site import addsitedir
from django.core.handlers.wsgi import WSGIHandler
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
sys.path.append('/home/pawesome/webapps/qtsocial/myproject')
sys.path.append('/home/pawesome/webapps/qtsocial')
addsitedir('/home/pawesome/envs/pinax072/lib/python2.6/site-packages')
application = WSGIHandler()
我想这解决了一些问题,但不是全部。。。现在我。。。[Sun Feb 19 20:00:28 2012] [error] [client 127.0.0.1] mod_wsgi (pid=15572): Exception occurred processing WSGI script '/home/pawesome/webapps/qtsocial/myproject.wsgi'.
[Sun Feb 19 20:00:28 2012] [error] [client 127.0.0.1] Traceback (most recent call last):
[Sun Feb 19 20:00:28 2012] [error] [client 127.0.0.1] File "/home/pawesome/webapps/qtsocial/lib/python2.6/django/core/handlers/wsgi.py", line 250, in __call__
[Sun Feb 19 20:00:28 2012] [error] [client 127.0.0.1] self.load_middleware()
[Sun Feb 19 20:00:28 2012] [error] [client 127.0.0.1] File "/home/pawesome/webapps/qtsocial/lib/python2.6/django/core/handlers/base.py", line 47, in load_middleware
[Sun Feb 19 20:00:28 2012] [error] [client 127.0.0.1] raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Sun Feb 19 20:00:28 2012] [error] [client 127.0.0.1] ImproperlyConfigured: Error importing middleware django_openid.consumer: "No module named voting_extras"
再次感谢各位。。。网络派的人最近放弃了,让我来这里,尽管我已经哈哈大笑了