[Zope] Passing parameters to Pyhton method
Dieter Maurer
dieter@handshake.de
Fri, 13 Sep 2002 20:04:44 +0200
=?iso-8859-1?Q?Juan_Manuel_Ruiz_Garc=EDa?= writes:
> I'm trying to do something that maybe can't be done...
>
> First, I get some variables joined in DTML variable "present" with:
>
> <dtml-call "REQUEST.set('present.name',name)">
> <dtml-call "REQUEST.set('present.lastname',lastname)">
>
> If I use
>
> <dtml-var present.name>
>
> I can see what I expected (the name), but I want to pass the "present"
> "record" to a Pyhton Method...
You did not create a record but individual (unrelated) entries in
"REQUEST".
Today, I made the "ZPublisher.HTTPRequest.record" class available
in (my local) "Products.PythonScripts.standard".
Looks like:
security.declarePublic('record')
import ZPublisher
class record(ZPublisher.HTTPRequest.record):
_guarded_writes= 1
def __init__(self,dict=None,**kw):
if dict is not None: self.__dict__.update(dict)
self.__dict__.update(kw)
It will not help you in DTML, but could in a Python script.
Dieter