4 Apr
2003
4 Apr
'03
5:54 p.m.
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