0
错误的第一行:_wrapped_view()需要至少1个参数(0给出)在Django当现金视图
@cache_page(3600)
def get_big_items_html():
....
return 'some html string'
这是我的settings.py
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
}
}
所以它可以帮助,但我得到另一个错误:“SafeText”对象有没有属性“流式” 。我的网站上有类别,必须获取所有类别和模板才能呈现类别,我希望保存为类别与模板合并结果的现金字符串。 – icdu91
查看需要返回的HttpResponse对象,所以只需改为'return HttpResponse('你的html')' – vanadium23