[Zope-CMF] New Product, __getattr__ and dtml-in

samuzeau@oreka.com samuzeau at oreka.com
Mon Sep 13 07:17:22 EDT 2004


Hi,

I have a new product under CMF1.3/Zope2.6.0

This produtc is a new Specific Type.
In that one I have in my class:

...
def __getattr__(self, attrname ):
if attrname == 'attrib':
return functionlamdba()
else:
return getattr(self,attrname)
...

Somewhere, in a DTMLDocument I have

<dtml-in expr="listFolderContents( contentFilter=filter )">
<dtml-let size="_['sequence-length']">
...
</dtml-in>


Of course I have an error if I try to render this DTMLdocument!
The sequence-length's attribute is calling with my instance's Product, and of course doesn't exist !!!

So I had a look to the Dieter's page "http://www.dieter.handshake.de/pyprojects/zope/".

But unfortunately, I don't understand what is __of__ , and obviously if I can resolve my trouble by this way.

Sincerily
PS

////////////////////////////////////////////////////////////
// Webmail Oreka : http://www.oreka.com
////////////////////////////////////////////////////////////




More information about the Zope-CMF mailing list