[Zope-CMF] regarding REQUEST

Andreas Jung lists at zopyx.com
Wed Sep 12 03:05:17 EDT 2007

--On 12. September 2007 12:07:54 +0530 mrajasekhar 
<mrajasekhar at zeomega.com> wrote:

> def fun1(self):
>       REQUEST=self.REQUEST
>       fun2=self.veiws.fun3
>       return fun2(self,REQUEST=REQUEST)
> what is the meaning of REQUEST=self.REQUEST

The REQUEST is always available as part of the "current" object - usually 
referenced as 'context' in PythonScripts, 'context' or 'here' in ZPTs
or when using 'self' within the implemetation of a Zope class. There is
nothing specific about CMF here.

 in the above function.what
> is it doing and iam returning fun2 to the browser
> please explain me in detail

If the method expects a REQUEST object (for whatever reason)
you have to pass it in. A method of a persistent object could also
take the REQUEST from 'self'....

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20070912/d808923a/attachment.bin

More information about the Zope-CMF mailing list