
lists at zopyx
Sep 12, 2007, 12:05 AM
Post #3 of 3
(966 views)
Permalink
|
--On 12. September 2007 12:07:54 +0530 mrajasekhar <mrajasekhar [at] zeomega> 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'.... -aj
|