Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

regarding REQUEST

 

 

Zope cmf RSS feed   Index | Next | Previous | View Threaded


mrajasekhar at zeomega

Sep 11, 2007, 11:37 PM

Post #1 of 3 (771 views)
Permalink
regarding REQUEST

def fun1(self):
REQUEST=self.REQUEST
fun2=self.veiws.fun3
return fun2(self,REQUEST=REQUEST)

what is the meaning of REQUEST=self.REQUEST in the above function.what
is it doing and iam returning fun2 to the browser
please explain me in detail
_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


robert at redcor

Sep 11, 2007, 11:52 PM

Post #2 of 3 (717 views)
Permalink
Re: regarding REQUEST [In reply to]

mrajasekhar schrieb:
> def fun1(self):
> REQUEST=self.REQUEST
> fun2=self.veiws.fun3
> return fun2(self,REQUEST=REQUEST)
>
> what is the meaning of REQUEST=self.REQUEST in the above function.what
> is it doing and iam returning fun2 to the browser
> please explain me in detail
> _______________________________________________
> Zope-CMF maillist - Zope-CMF[at]lists.zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>
this is such a basic question, that I higly recommend that you look at
http://www.plope.com/Books/2_7Edition

in short: the request is a dictionary like object that gives access to
all data pertaining to the communication between the client and the server.

you can easily have a detailed look at it with a page template like the
following:

<html>
<body>

<div tal:content=structure "context/REQUEST" />

</body>
</html>

hth
robert
Attachments: robert.vcf (0.21 KB)


lists at zopyx

Sep 12, 2007, 12:05 AM

Post #3 of 3 (716 views)
Permalink
Re: regarding REQUEST [In reply to]

--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'....

-aj

Zope cmf RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.