[Zope] Programmatic creation/update of ZSQL methods

Joseph Griffin jgriffin@pclnet.net
Thu, 31 Oct 2002 15:08:25 -0600


Charlie,
I think you will have to use Zope's Python interface to do what you want. Get 
the Zope Developer's Handbook and read up on the Debugger. It exposes Zope's 
app object - with that you can programmatically add objects to the ZODB, just 
remember to commit the transaction. Joseph
On Thu, 31 Oct 2002 11:49:08 -0800, Charlie Reiman wrote
> I've got about 60 or so ZSQL methods that I maintain in my Zope. 
> Actually, I don't maintain them: our Oracle expert changes them then I 
> have to translate them into DTML, split them into little chunks, and 
> upload them into zope.
> 
> Since I'm terribly lazy I've automated the DTMLification and the splitting.
> But the third step of uploading the ZSQL bodies is tricker. Currently I'm
> uploading them via FTP but this requires that the methods already 
> exist (due to a lack of object type magic). I've also tried using 
> xmlrpc but manage_addZSQLMethod does not seem to live on Folder so I'm 
> not sure how I can call it.
> 
> So my question is: How can I create ZSQL methods from an external 
> program (a python script in this case)? I've got the body, the id, the 
> destination, the connection id, the parameters... everything but a clue.
> 
> I know about PUT_factory but I didn't have much luck with that either.
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


PCL Internet WebMail	(http://www.pclnet.net)