这是什么错误,老师看一下:cache = get_redis_connection('default')

来源:4-7 redis在django中的两种配置方法与使用&缓存装饰器的书写

珍惜当下2024

2024-07-14

In [2]: cache = get_redis_connection(‘default’)

NotImplementedError Traceback (most recent call last)
Cell In[2], line 1
----> 1 cache = get_redis_connection(‘default’)

File D:\Python_work\project_env\lib\site-packages\django_redis_init_.py:15, in get_redis_connection(alias, write)
12 cache = caches[alias]
14 if not hasattr(cache, “client”):
—> 15 raise NotImplementedError(“This backend does not support this feature”)
17 if not hasattr(cache.client, “get_client”):
18 raise NotImplementedError(“This backend does not support this feature”)

NotImplementedError: This backend does not support this feature

写回答

1回答

deweizhang

2024-12-30

你好 从错误上来说 感觉是你传错蚕食了

0
0

Django入门到进阶-适合Python小白的系统课程

入门Django的同时,让你形成更贴近实际工作的Python Web开发知识体系

1114 学习 · 464 问题

查看课程