[z3-five] Re: SimpleViewClass and __hash__
Philipp von Weitershausen
philipp at weitershausen.de
Mon May 9 15:08:57 CEST 2005
Florent Guillaume wrote:
> Philipp von Weitershausen wrote:
>
>>>No. I'm saying that if the published doesn't have a getId() method, then
>>>you pass an object to getThemeByMethod instead of a string.
>>
>>So, what's an obvious solution then? Add a getId() method to Five's
>>ZPTs? (I'd rather do that instead of adding a weird __hash__...)
>
>
> That could work yes. It's probably a good idea to give a getId to
> objects used in a Zope 2 context in any case.
You are probably quite right. However, I just looked at
Products.PageTemplates.PageTemplateFile and PageTemplateFile actually
inherits from OFS.SimpleItem.Item_w__name__, so our
ZopeTwoPageTemplateFile (which inherits from PageTeplateFile) should
already have a getId() method...
So, I guess the problem occurs with subclasses of ViewMixinForAttributes
and ViewMixinForTemplates then?
Philipp
More information about the z3-five
mailing list