Computed Field for Dexterity

There is a slight problem for advanced use-cases: In a @property the object itself (self) is not Acquisition-aware.
You can either use @ComputedAttribute instead (see https://stackoverflow.com/questions/12544129/zope-cannot-access-request-under-property-decorator) or use a hack like wrapped = api.content.get(UID=self.UID()) which makes wrapped the same as self but now it has aq-related features like __parent__ and absolute_url().

1 Like