我正在尝试设置 ApacheDjango . 我在项目根目录下有文件 django.wsgi ,内容如下

import os
import sys

# activate virtualenv
activate_this = os.path.expanduser(
    "/var/www/continue/env-continue/bin/activate_this.py"
)
execfile(activate_this, dict(__file__=activate_this))

PROJECT_DIR = '/var/www/continue/'
APP_PATH = os.path.join(PROJECT_DIR, 'app',).replace('\\', '/'),

sys.path.append(APP_PATH)
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' # also tried 'continue.settings', but same errors appears

# import django.core.handlers.wsgi
# application = django.core.handlers.wsgi.WSGIHandler()
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

但是我在日志文件中收到以下错误 Target WSGI script '/var/www/continue/django.wsgi' cannot be loaded as Python module

[Wed Feb 18 14:28:28.273972 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] mod_wsgi(pid = 28781):Target WSGI script'/ var / www / continue / django .wsgi'无法作为Python模块加载 . [Wed Feb 18 14:28:28.274014 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] mod_wsgi(pid = 28781):处理WSGI脚本'/ var / www / continue /时发生异常django.wsgi” . [Wed Feb 18 14:28:28.274038 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] Traceback(最近一次电话 Session ):[Wed Feb 18 14:28:28.274060 2015] [ :错误] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]文件“/var/www/continue/django.wsgi”,第18行,[Wed Feb 18 14:28:28.274137 2015] [:错误] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]来自django.core.wsgi import get_wsgi_application [Wed Feb 18 14:28:28.274152 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76 . 4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django/core/wsgi.py”,第2行,在[Wed Feb 18 14:28:28.274174 2015] ] [:错误] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]来自django.core.handlers.wsgi导入WSGIHandler [Wed Feb 18 14:28:28.274186 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django/core/handlers/wsgi.py”,lin e 11,在[Wed Feb 18 14:28:28.274211 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]来自django import http [Wed Feb 18 14:28:28.274229 2015] [ :错误] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django/http/init.py”,第4行,在[Wed Feb 18 14:28:28.274253 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]来自django.http.response import(HttpResponse,StreamingHttpResponse,[Wed Feb 18] 14:28:28.274279 2015] [:错误] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django /http/response.py“,第13行,在[Wed Feb 18 14:28:28.274298 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]来自django.core.serializers.json import DjangoJSONEncoder [Wed Feb 18 14:28:28.274310 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] file“/ var / www / con tinue / env-continue / lib / python2.7 / site-packages / django / core / serializers / init.py“,第23行,[Wed Feb 18 14:28:28.274328 2015] [:error] [pid 28781: tid 140719897437952] [客户端180.76.4.231:59036]来自django.core.serializers.base import SerializerDoesNotExist [Wed Feb 18 14:28:28.274340 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036 ]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django/core/serializers/base.py”,第6行,[Wed Feb 18 14:28:28.274357 2015] [:错误] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]来自django.db导入模型[Wed Feb 18 14:28:28.274368 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76 .4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django/db/models/init.py”,第6行,[Wed Feb 18 14:28 :28.274387 2015] [:错误] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]来自django.db.models.query import Q,QuerySet,Prefetch#NOQA [Wed Feb 18 14:28:28.2 74404 2015] [:错误] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django/db/models /query.py“,第13行,在[Wed Feb 18 14:28:28.274435 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]来自django.db.models.fields import AutoField ,空[Wed Feb 18 14:28:28.274454 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] File“/var/www/continue/env-continue/lib/python2.7 /site-packages/django/db/models/fields/init.py“,第15行,[Wed Feb 18 14:28:28.274489 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231: 59036]来自django.db.models.lookups import default_lookups,RegisterLookupMixin [Wed Feb 18 14:28:28.274505 2015] [:error] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django/db/models/lookups.py”,第6行,[2月18日星期三14: 28:28.274525 2015] [:错误] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]来自django.utils import timezone [Wed Feb 18 14:28:28.274536 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/django/utils/timezone.py”,第13行,[Wed Feb 18] 14:28:28.274554 2015] [:错误] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] import pytz [Wed Feb 18 14:28:28.274565 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/pytz/init.py”,第29行,在[Wed Feb 18 14:28: 28.274583 2015] [:错误] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]来自pkg_resources import resource_stream [Wed Feb 18 14:28:28.274594 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/pkg_resources.py”,第2829行,[Wed Feb 18 14:28:28.274612 2015 ] [:错误] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] working_set = WorkingSet._build_master()[Wed Feb 18 14:28:28.274622 2015] [:error] [pid 28781:tid 140719897437952] [客户端180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/pkg_resources.py”,第440行,在_build_master [Wed Feb 18 14:28:28.274639 2015 ] [:错误] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] ws = cls()[Wed Feb 18 14:28:28.274656 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76 .4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/pkg_resources.py”,第433行,在init [Wed Feb 18 14:28:28.274674 2015] [ :错误] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] self.add_entry(entry)[Wed Feb 18 14:28:28.274685 2015] [:error] [pid 28781:tid 14071989743795 2] [client 180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/pkg_resources.py”,第489行,在add_entry [Wed Feb 18 14:28 :28.274701 2015] [:错误] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] for find in find_distributions(entry,True):[Wed Feb 18 14:28:28.274712 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036]文件“/var/www/continue/env-continue/lib/python2.7/site-packages/pkg_resources.py”,第1817行,在find_distributions [Wed Feb 18 14:28:28.274728 2015] [:错误] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] importer = get_importer(path_item)[Wed Feb 18 14:28:28.274739 2015] [:error] [pid 28781 :tid 140719897437952] [client 180.76.4.231:59036]文件“/usr/lib/python2.7/pkgutil.py”,第384行,get_importer [Wed Feb 18 14:28:28.274756 2015] [:error] [pid 28781:tid 140719897437952] [client 180.76.4.231:59036] importer = path_hook(path_item)[Wed Feb 18 14:28:28.274775 2015] [:error] [pid 28781: tid 140719897437952] [client 180.76.4.231:59036] TypeError:必须是字符串,而不是元组

我想知道出了什么问题?