[Zope3-Users] Autocreated content objects

Darryl Cousins darryl at darrylcousins.net.nz
Mon Sep 25 04:46:24 EDT 2006


Hi John,

This may be what you are after:

root['my-app'] = MyApp()

Regards,
Darryl

On Mon, 2006-09-25 at 17:21 +1000, John Maddison wrote:
> Hi there,
> 
> Is it possible/wise to "auto-create" content objects in the ZODB?  Say
> I'm creating a blog application and have a container
> type(BlogContainer) and want an instance called "blog" in the root of
> the ZODB.  Is it possible to programatically specify this, or is my
> only option to create it through the ZMI? I thought that perhaps an
> event was generated when the root object was created that I could hook
> into, but it seems not.  Perhaps I'm looking at this the wrong way -
> would "fixtures" like this be better implemented as utilities with
> z3c.traverser redirecting to appropriate views?
> 
> John
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users



More information about the Zope3-users mailing list