2005/9/23, Anders Bruun Olsen <anders@bruun-olsen.net>:
Why the extra self-wrapping. Do it this way: def testit(self, REQUEST=None): return self.test(self, self.REQUEST, something="blah") Then you'll be able to use: <span tal:replace="options/something"/>
Thanks, I have now tried that, but it still does not work. I still get:
Error Type: KeyError Error Value: 'something'
Please press "Reply-All" and not just to me. That is the correct way of calling PageTemplateFile objects in python code. I've got it working in many places. The error must be either a new zope bug or something else being wrong. Is your setup as simple as you've described in the email? What happens when you in that TAL do something like: <br tal:replace="python:str(options)" /> Do the other namespaces work in the page template? Eg. <br tal:replace="python:len(request.form.keys())" /> or <br tal:replace="python:context.absolute_url_path()" /> -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com