1
for num in range(1,4):
results = memcache.get("link_" + str(num))
output.write('An anonymous person wrote: <blockquote>%s</blockquote>' % results.date)
return output.getvalue()
這個代碼不工作:
results = memcache.get_multi(linkKeys,"link_")
for results in results:
output.write('An anonymous person wrote: <blockquote>%s</blockquote>' % results.date)
return output.getvalue()
有人能使用的原因返回memcache.get_multi錯誤給我解釋一下:
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 515, in __call__
handler.get(*groups)
File "C:\Main.py", line 28, in get
values.write(self.RenderValue())
File "C:\Main.py", line 57, in RenderValue
output.write('An anonymous person wrote: <blockquote>%s</blockquote>' % results.date)
AttributeError: 'str' object has no attribute 'date'
感謝有人幫我解決這個問題!