Re: [Zope-dev] Python method wrapping around DTML method
On Friday 03 January 2003 10:13 am, Bjorn Stabell wrote: Right now, I'm struggeling because I cannot get the namespace to be passed to PlainFunc, therefore PlainFunc cannot pass the namespace on to DTMLFunc. Any clues? There isnt one true namespace. You can create your own as easy as { }, and it will be as good as any other. If you want an authentic ZPublisher namespace then you need http://www.zope.org/Members/htrd/howto/FunctionTemplate -- Toby Dickenson http://www.geminidataloggers.com/people/tdickenson ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Python method wrapping around DTML method
Bjorn Stabell wrote: in such a way that DTMLFunc gets everything it needs, e.g., namespace, but PlainFunc can do funky things to this namespace before-hand (like insert a few variables into it). In other words, I want a Python method to wrap around a DTML method. It is pretty simple: class myProduct: # The dtml object DtmlFunc = HTMLFile('DtmlFunc', globals()) # to call it def PlainFunc(self): Remember docstring extraParameter = 'Some string' return self.DtmlFunc(self, self.REQUEST, extraParameter=extraParameter) regvards Max M ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )