-----Original Message----- From: Piers Lauder [mailto:piers@cs.su.oz.au] Sent: Tuesday, March 02, 1999 1:54 AM To: Zope Mailinglist Subject: [Zope] Help with editing Product dtml files
I'm making a Zope "Product" for managing and creating student surveys (which I hope to contribute via zope.org) but I'm having trouble with a couple of techniques:
1. How does one enable a dtml file that is instantiated as in my_dtml = HTMLFile('my', globals()) available for editing in the products' management screen?
Make your Product a Folderoid (zopespeak for a Folder Object) that contains it's own user interface which the manager can edit. Your __init__ function initially loads the documents off disk into the Folder. Confera and NotMail both do this (Confera does it a little smarter).
There's probably more to this - as at the moment the management screen goes straight to the "index_html" form as with the "Poll" Product.
2. What's the approved way to catch database errors in methods?
I'll let someone who has more experience with those areas answer this one. :)
I'm creating tables on the fly, and need to check if the table exists before trying to create it. (I'd use a "tables" method if all the database interfaces supported it. I'd also use a try/except but the database objects have different names for their exceptions.)
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope