Maurits van Rees <m.van.r...@...> writes:
>
> 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.
Nice. In this case you use the BrowserView subclass as a general
purpose logic mechanism. Do you include a page template to show
status? I see the benefit of using this to isolate the creation
logic but might get confused if there is no actual "view"
behavior for the browser view.
Dave
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers