DTML<->Python confusion (RE: [Zope] How to make a script return rendered dtml)
Peter Bengtsson
mail@peterbe.com
Fri, 15 Jun 2001 09:17:50 +0200
I knew it! Because when you add a product via the management interface, you
actually browse (via the action tag in the form) away to a python def.
def manage_addproduct(self, fromwhere, hey, wheredidthiscomefrom, RESPONSE)¨
Where does mapply() function?
Peter
> Peter Bengtsson wrote:
>
> > Is there a special little trick in Zope that passes REQUEST as a
parameter
> > to say "this is ZMI"? Is REQUEST specially treated compared to other
> > arguments?
>
> That's the magic of "mapply". Basically, the target of a request gets
> called by the "mapply" function, which sniffs its call signature and
> tries to match parameter names to names in the REQUEST, including
> "REQUEST". If you create a Script and give it parameters like REQUEST
> and RESPONSE, it will get them when it is the request target.
>
> --
> Cheers,
>
> Evan @ digicool
>