擅长:python、mysql、java
<p>修复:我必须将我的项目文件夹添加到wsgi脚本中的sys.path。这是我的新wsgi脚本:</p>
<blockquote>
<p>activate_this =
'/home/nimbiotics/.virtualenvs/nrpccms/bin/activate_this.py'
execfile(activate_this, dict(<strong>file</strong>=activate_this))</p>
<p>import os import sys</p>
<p>path = '/home/nimbiotics/projects' if path not in sys.path:
sys.path.append(path)</p>
##################################################### nrpccms_path = '/home/nimbiotics/projects/nrpccms' if nrpccms_path not
<p>in sys.path:
sys.path.append(nrpccms_path)</p>
#
<p>os.environ['DJANGO_SETTINGS_MODULE'] = 'nrpccms.settings'</p>
<p>import django.core.handlers.wsgi application =
django.core.handlers.wsgi.WSGIHandler()</p>
</blockquote>