[Product-Developers] Re: Content creation during install

Maurits van Rees m.van.rees at zestsoftware.nl
Fri Apr 17 18:44:09 UTC 2009


Dave Turvene, on 2009-04-17:
> My question: what is the current thinking on programmatic content
> creation during product install?

What I usually do is create a browser view, called for example
@@initial_content_creation, that you call manually on the Plone Site.
Then put some lines in there that do things like create a document:

context.invokeFactory('Document', id='doc', title='Hello world.',
                      text='It is good to see you.')

Good places to look for how to create things programmatically are
tests, for example the tests in Products.CMFPlone itself.

-- 
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]





More information about the Product-Developers mailing list