[zope] extra data for users
Harry Wilkinson
harryw@nipltd.com
Thu, 25 Apr 2002 09:54:38 +0100
You don't need to import them like you would in pure Python. You acquire the
tools through Zope. "context.portal_registration" will probably get the
registration tool in a Python script, for instance.
Harry
On Thursday 25 April 2002 8:39 am, Ian! wrote:
> How can I import those .py files?
>
> When I try to import them with a regular script, it doesn't work (the
> modules are restricted). When I try to import them from an external script,
> it can't find them.
>
> ----- Original Message -----
> From: "Harry Wilkinson" <harryw@nipltd.com>
> To: "Ian!" <imcmeans@shaw.ca>; <zope@zope.org>
> Sent: Wednesday, April 24, 2002 2:06 AM
> Subject: Re: [zope] extra data for users
>
> > On Wednesday 24 April 2002 12:07 am, Ian! wrote:
> > > Sorry if this is a newbie question, but I'm having a hard time finding
> > > general advice on this. I'm really new to zope.
> > >
> > > I'm running zope, CFM and plone. I am trying to build a "secret santa"
> > > system, where each user will eventually be given the address and name
> > > of another user that they will send a gift to. This means that each
> > > user
>
> needs
>
> > > to have the additional "address" and "gives-to" fields.
> > >
> > > Can someone give a recommendation of how I should store this extra
> > > data? Should I extend the zope users, or should I store the data with
> > > the CFM member's folder (what format would this be?), or should I put
> > > it all in
>
> a
>
> > > database?
> > >
> > > Ideally I'd have the data with the zope user object, so that when
>
> someone
>
> > > deletes themself from the system I can track down their recipient and
>
> find
>
> > > the recipient a new giver. Is there an easy way to add new attributes
> > > to the user, and are they easily modified after the user is created?
> >
> > If you're already using CMF, then member objects are exactly what you
>
> want.
>
> > CMF member objects are basically just user objects in a user folder, but
>
> the
>
> > member tools wrap them in a MemberData object which allows you to add
> > properties to the member, which get stored in the ZODB.
> >
> > I don't know of a good reference for CMF members; I always just look at
>
> the
>
> > code itself to see what's there. The 3 tools to look at for managing
>
> member
>
> > objects are:
> >
> > MembershipTool.py (portal_membership in the ZMI)
> > MemberDataTool.py (portal_memberdata in the ZMI)
> > RegistrationTool.py (portal_registration in the ZMI)
> >
> > These are in Products/CMFCore and Products/CMFDefault. The
>
> MembershipTool.py
>
> > is in both; the default tool inherits from the core tool.
> >
> > Hope that's useful to you.
> >
> >
> > Harry