[Zope-CMF] Saving custom data in a MemberData-objectfrompython
Tres Seaver
tseaver@digicool.com
Sat, 21 Apr 2001 10:57:51 -0400
marc lindahl wrote:
>
> > From: Shane Hathaway <shane@digicool.com>
> >
> > marc lindahl wrote:
> >>
> >> Question: let's say you add some preference, like birth_date. How/where do
> >> you change the sign-up screen and the preferences screen to access that?
> >> And do some action like, don't allow signup for age<13....
> >
> > Currently you'd have to subclass or replace portal_registration, which
> > you could do with ZClasses or a Python product. Invoking a customizable
> > script might be better.
>
> Forgive my newbieness but... replacing portal_registration.py would impact
> all CMF sites, right? Probably not a good idea... and subclassing it and
> sticking the subclass into wherever portal_registration.py is used would be
> basically the same thing, right?
Shane is recommending replacing the instance, named
'portal_registration' in the root of your CMFSite, with an
instance of another class; you wouldn't (ordinarily, at least)
want to muck with Products.CMFDefault.RegistrationTool (the module
which exports the class of the current instance).
> If there were some way to modify the portal_registration tool
> once the CMF site was created, like the way portal_memberdata
> properties can be added, would that be a way to do it?
The current implementation of the registration tool doesn't permit
any "through-the-web" tweaking of its policies. We typically expect
to replace several of the tools with custom versions; the registration
tool is one of these.
> Is this kind of thing the purpose of the CMFDefault directory?
The tools and content in the CMFDefault product provide working
versions of the components needed to build a CMF-based site; many
sites can happily use them, *where the policies they implement are
reasonable*. We moved the different "services" of the site into
replaceable "tool objects" precisely to allow a site to replace one
or more of them, while leaving in place those "default" versions
which are acceptable.
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org