Re: Hints on How to build a Silva Document from Zope Python Script

Marc Petitmermet <[email protected]> Sun, 21 Oct 2007 21:27:01 +0200
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
> I'm interested in building unpublished empty Silva Document (For  
> Silva 2.0) holders directly from a Zope Python Script, to be called  
> from a Silva form that will be filled later using XML import.
>
> I'd appreciate any suggestion on this matter.

i've already done the same thing (creating silva document but with  
content) but i just cannot find the code source anymore:-((

in such a case like yours it is always a good idea to "egrep" through  
the silva code (because they do this already when creating a silva  
document). and then you find something like this in SilvaDocument/ 
Document.py:

   object.manage_addProduct['SilvaDocument'].manage_addDocument(id,  
title)

so you need to provide "object", "id" and "title". and i'm pretty  
sure that you have to take care about security (spam protection,  
proxy roles, etc.).

regards,
marc