Thank you: I now have all the filtering code in the browser view class and am using providedBy rather than isinstance. The update method forbiddenAttribute problem got sorted using setattr(...) instead of attribute=...


Philipp von Weitershausen wrote:
Cliff Ford wrote:

Thanks for the help. I 'discovered' the isinstance method in the ZAPI Reference of your book, which is just what I needed.

Note that with isinstance, you check for a certain implementation, not for functionality. In general, that is not preferrable because implementations may change, interfaces usually don't.

So, for filtering, it's preferrable to use ISomeInterface.providedBy(obj)

I put the filter method in the custom content class rather than a
separate view class. It all seems to work so I am progressing again.

Putting display filtering in a content class is not quite a kosher way to go. You should filter in the browser view.


Zope3-users mailing list
Zope3-users mailing list

Reply via email to