[Zope-CMF] Portal users and some other stuff

Jens Vagelpohl jens at dataflake.org
Fri Jan 12 04:13:54 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 11 Jan 2007, at 23:28, Charlie Clark wrote:
> For the necessary forms, at least based on the CMF Event code, it  
> seems to me that code like
>
> options['title'] = form.get('title', context.Title())
> options['text'] = form.get('text', context.text)
> options['text_format'] = form.get('text_format', context.text_format)
> options['headline'] = form.get('headline', context.headline)
> options['teaser'] = form.get('teaser', context.teaser)
> options['category'] = form.get('category', context.category)
> options['keywords'] = form.get('keywords', context.keywords)
> options['resources'] = form.get('resources', context.resources)
>
> could be optimised in the context could be treated as a dictionary  
> object, ie. supported get.

That's a matter of taste. I like explicit, so I prefer the existing  
method.


> I was initially confused that the context was the same as the  
> instance of my content-type and didn't support this as I use this  
> idiom quite frequently to reduce my typos. Is this too much of an  
> edge case to warrant the extension in general (but I'm free to do  
> it myself) or perhaps an outdated methodology?

I'm not sure what this paragraph means.


> If I need to add attributes to portal users such as their full  
> name, is it best to customise the member object for my site or to  
> use a plugin?

All you need to do is to add the desired property to the list of  
properties in the member data tool, and then extend the preferences  
form and its handlers with your new property (untested off the top of  
my head).

jens


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFp1FTRAx5nvEhZLIRAh+FAJ4h+rwjQddNZmgQxC9VR5YM/mIbkACfdApq
C7k1wHBdfTuf4BUvHoIqRe0=
=oxjF
-----END PGP SIGNATURE-----


More information about the Zope-CMF mailing list