4 Apr
4 Apr
5:54 p.m.
New subject: [Zope] cookies, dtml and zpt
I have a dtml_method (check_latest_news) wich also set a cookie. I use this method in a pagetemplate: <span tal:replace="structure python: container.check_latest_news(here)"/> If i test the method everything is working fine, but if i test the template, i receive the following error: Error Value: global name 'RESPONSE' is not defined
I haven't ever done this, so I'm guessing, but I suspect that the DTML method expects to be given the request as a parameter, which usually happens automatically, but doesn't when you call it like that. Try instead python: container.check_latest_news(here, REQUEST) or maybe python: container.check_latest_news(here, REQUEST=REQUEST) --jcc
8402
Age (days ago)
8403
Last active (days ago)
1 comments
2 participants
participants (2)
-
J Cameron Cooper -
Jos van der Vleuten