[Zope] Call python functhion in dtml-file

Chris Withers lists at simplistix.co.uk
Mon Mar 22 11:50:30 EST 2004


Serg wrote:

> I have problem with below code:
> ------A.py------
> def aaa(self):
>     " "
>     # do something

How is Zope supposed to find this aaa method?

Where does it become an attribute of your class or your object?

> Zope write:
> Site Error
> An error was encountered while publishing this resource. 
> Debugging Notice
> Zope has encountered a problem publishing your object. 
> Cannot locate object at: http://localhost:8080/min/1/aaa

Exception type, value and traceback please...

> Zope cannot find function aaa() from A.py.
> 
> How can I call python functhion in dtml-file?

Make it a method of your A class....

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the Zope mailing list