【发布时间】:2012-03-28 01:48:43
【问题描述】:
我正在尝试在 GAE(Google App Engine)上设置 django-nonrel - 按照这里的步骤http://www.allbuttonspressed.com/projects/djangoappengine#installation
测试应用程序运行良好 -
我可以在应用程序中使用缓存 API,但对于测试和 shell 则不行:
尝试在 shell 中 from django.core.cache import cache 给了我:
>>> from django.core.cache import cache
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "django-testapp/django/core/cache/__init__.py", line 182, in <module>
cache = get_cache(DEFAULT_CACHE_ALIAS)
File "django-testapp/django/core/cache/__init__.py", line 180, in get_cache
return backend_cls(location, params)
File "django-testapp/django/core/cache/backends/memcached.py", line 154, in __init__
import memcache
ImportError: No module named memcache
以同样的方式尝试./manage.py test 失败。
知道为什么./manage runserver 工作正常,但./manage shell 或./manage test 无法导入缓存吗?
【问题讨论】:
标签: django-nonrel