[z3-five] FieldProperty, acquisition and Zope 2
Martin Aspeli
optilude at gmx.net
Sat Feb 24 13:12:14 CET 2007
Philipp von Weitershausen wrote:
> 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?
Hey, I learned about them from *your* book, you tell me. :-)
I agree it's a bit YAGNI. :)
Martin
More information about the z3-five
mailing list