[Grok-dev] Spotlight on : dolmen.content
trollfot at gmail.com
Mon Jan 25 16:18:30 EST 2010
The first version of dolmen.content was initially using kwargs to init
I didn't keep if, since the content are usually used with the
applyData kind of method.
I did re-write partially the package to bootstrap the fields using a
zope.interface advisor and to remove the icon directive.
Modifying the __init__ wouldn't be much of a hassle and can be done
Feel free to have a look at the package and see how it could be
modified to fit your needs.
I'd delighted if it could be useful to anyone and I'm ready to spend
the necessary time for that
2010/1/25 Martijn Faassen <faassen at startifact.com>:
> Souheil CHELFOUH wrote:
>> When the content is registered, a factory is registered, using the
>> full module and class dotted names. It allows us to query and
>> instanciate the content easily::
>> >>> from zope.component import getUtility
>> >>> factory = getUtility(dolmen.content.IFactory,
>> ... name="dolmen.content.MyContent")
>> >>> factory
>> <dolmen.content.factoring.Factory object at ...>
> I think nice for the docs would be a demonstration of getting *all*
> IFactory utilities available to the system. This is something that a CMS
> built with dolment.content will often need.
> Perhaps you can also talk a bit to the argument signature to __init__()
> of content objects. In order for utilities to be universally useful,
> they'd need the same argument signature, right?
> dolment.content is quite close to what an app I am working on might
> need. I used a homegrown infrastructure for this, but I suspect it can
> be cleaned up if I use this.
> Grok-dev mailing list
> Grok-dev at zope.org
More information about the Grok-dev