Thank you very much. This technique works perfectly. -shailesh
On 11/17/06, Thierry Florac <[EMAIL PROTECTED]> wrote:
Le vendredi 17 novembre 2006 à 16:59 +0530, Shailesh Kumar a écrit : I currently use something like this, to handle a site configuration on startup (define catalog indexes...) : from zope.app.appsetup.interfaces import \ IDatabaseOpenedWithRootEvent from zope.app.publication.zopepublication import ZopePublication from zope.component import adapter @adapter(IDatabaseOpenedWithRootEvent) def handleDatabaseOpenedWithRootEvent(event): db = event.database connection = db.open() root = connection.root() root_folder = root.get(ZopePublication.root_name, None) ... And in ZCML : <subscriber handler=".handleDatabaseOpenedWithRootEvent" /> Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : [EMAIL PROTECTED] Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85
_______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users