[Zope3-dev] Re: Creating new objects in a package

Philipp von Weitershausen philipp at weitershausen.de
Thu Sep 23 12:35:42 EDT 2004


Peter Mayne wrote:
> I'm using the MessageBoard package to experiment with.
> 
> I'd like to pre-load some messages from a package script, but after 
> reading various documentation (including the Zope3 book and tutorials) I 
> can't figure out how to do something as basic as create and save new 
> objects.

You could write an event subscriber that subscribes to 
IDatabaseOpenedEvent and then operates on the database directly. But I 
wouldn't do that.

I would do it much simpler and write (if not already provided) XML-RPC 
or WebDAV views/filerepresentation adapters and bulk-load objects using 
either a custom XML-RPC client script written in Python or whatever, or 
even a simple WebDAV or FTP client.

Philipp



More information about the Zope3-dev mailing list