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).


Version: GnuPG v1.4.5 (Darwin)

Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to