[Zope-CMF] Saving custom data in a MemberData-object from python

Sigve Tjora sigve@tjora.no
Sat, 21 Apr 2001 10:11:14 +0200 (CEST)


> Sigve Tjora writes:
>  > I want to save some data about users in their MemberData-object, and I use
>  > python for the task. Is it ok just to set a propertie on an
>  > MemberData-object or is there a better way?
>  >
>  > Eg. can I just write
>  >   user=portal_membership.getAuthenticatedUser()
>  >   user.myData="Just an object or a text..."

Dieter wrote:
> Be careful when you assign objects to attribute of
> persistent objects:
>
>   The ZODB does not like to store (Acquisition) wrapped objects.
>   There are a few more restrictions.
>
>   Failure to observe them with  result in nasty pickling exceptions.

I want to store a reference to folders in a members-object. When I tried
some thing worked and some not. Eg. absolute_url() didn't work at all. How
is that? How can I store a reference to to a folder or another
portalobject in a member-object so that everything of the original object
work as intended. It is not good enought just to store the url, because I
have to call methods on the portalobjects.

mvh Sigve Tjora