[Zope] Accessing methods in Python Objects

Cyril cyril.elkaim@free.fr
Thu, 30 Nov 2000 18:09:32 +0100 (CET)


       Hi Zopistas,

       My first message :-)

How can access Python objects' methods from a DTML Method.
I get An 'Unauthorized' exception. I would like to do the following:

<dtml-let myObj="newObj()">
  <dtml-var "myObj.sayHello()">
  <dtml-call "myObj.setValue('Bonjour')">
  etc...
</dtml-let>

where 'newObj()' is defined in an Extensions module as:

import someObject # a module defining the someObject class

def newObj():
  return someObject.Object()

Actually I must wrap methods in my extension module, not very clean :-/

Is it possible to create roles and permissions in Extensions modules ?
And if yes, is a good fellow ready to explain how :-)

Thanks in advance,
Cyril Elkaim