[z3-five] FieldProperty, acquisition and Zope 2

Philipp von Weitershausen philipp at weitershausen.de
Sat Feb 24 12:04:49 CET 2007


Martin Aspeli wrote:
> Now, this fails horribly, miserably and deep-deep inside zope.schema or
> thereabouts. To be honest, the traceback is pretty useless, but I've
> worked out that the error occurs because FieldProperty is a property,
> with __get__() and __set__() methods, and as soon as I go there, the
> task loses its acquisition context.
> 
> Now, http://zope.org/Collectors/Zope/2163 tells me that we can't have
> acquisition inside property accessors.
> 
> I'm wondering, though, if we have other options? Could Five provide
> something similar to FieldProperty but which is acquisition-aware?

Unlikely. I find FieldProperty is YAGNI most of the time. You describe 
that you're using formlib forms to apply the data to the object. Formlib 
does all the validation already. Why do you need FieldProperty?


-- 
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5


More information about the z3-five mailing list