0
我想使用Redis。所以我跟着这个教程:https://github.com/sebleier/django-redis-cache我怎么不能让Django与这个图书馆交谈?
首先,我安装的Redis-PY:https://github.com/andymccurdy/redis-py/
然后,我把这个在我的设置:CACHE_BACKEND = 'redis_cache.cache://localhost:6379'
然后,我做这在我的views.py:
from redis_cache import cache #this imports just fine!
cache.set("haha","lala")
print cache.get("haha")
但由于某些原因,我得到一个AttributeError:
Exception Type: AttributeError at/
Exception Value: 'module' object has no attribute 'set'