我正在尝试将我的 django 项目部署到 GAE。使用 appcfg.py 部署后,我在 GAE 中收到此错误。有谁知道如何解决这个问题?
Traceback (most recent call last):
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/runtime
/wsgi.py", line 223, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "/base/python27_runtime/python27_lib/versions/third_party/django-1.4/django
/core/handlers/wsgi.py", line 219, in __call__
self.load_middleware()
File "/base/python27_runtime/python27_lib/versions/third_party/django-1.4/django
/core/handlers/base.py", line 47, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' %
(mw_module, e))
ImproperlyConfigured: Error importing middleware django.middleware.cache: "No module
named memcache"
下一个代码显示了如何在我的 project.settings 中导入中间件类:
from djangoappengine.settings_base import *
....
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
感谢您查看这个。