[ZODB-Dev] Python properties on Persistent objects
l at lrowe.co.uk
Wed Dec 16 19:24:05 EST 2009
2009/12/17 Mikko Ohtamaa <mikko at redinnovation.com>:
> I need to have little clarification should properties work on
> Persistent objects. I am running ZODB 3.8.4 on Plone 3.3.
> I am using plone.behavior and adapters to retrofit objects with a new
> behavior (HeaderBehavior object). This object is also editable through
> z3c.form interface. z3c.form requires a context variable on the object
> e.g. to look up dynamic vocabularies. To avoid having this
> object.context attribute to be peristent (as it's known every time by
> the factory method of the adapter which creates/look-ups
> HeaderBehavior) I tried to spoof context variable using properties and
> internal volatile variable. This was a trick I learnt somewhere
This sounds like you are passing context somewhere where view is expected.
More information about the ZODB-Dev