14 Feb
1999
14 Feb
'99
9:12 p.m.
From: Mike Pelletier <mike@compar.com> Subject: [Zope] Using __repr__ and DocumentTemplates
I have an object I would like to be able to render with a DTLM tag like this: [...] If I view a page which attempts to render an instance of this class, it raises a KeyError, indicating that it doesn't know what 'id' in the DTML refers to. If I change the line to:
repr = HTMLFile("template")
and view it explicitly from my browser, I get the results I am expecting.
This appears to be related to my earlier, similar question whereby a method which is referenced directly called can reference its object's id, but an indirectly referenced method cannot. I'm still stuck. Kent