[Checkins] SVN: Sandbox/faassen/grokcore.site/trunk/src/grokcore/site/subscriber.py Don't forget this subscriber; it won't work without it.
Martijn Faassen
faassen at infrae.com
Fri Oct 17 14:48:06 EDT 2008
Log message for revision 92343:
Don't forget this subscriber; it won't work without it.
Changed:
A Sandbox/faassen/grokcore.site/trunk/src/grokcore/site/subscriber.py
-=-
Added: Sandbox/faassen/grokcore.site/trunk/src/grokcore/site/subscriber.py
===================================================================
--- Sandbox/faassen/grokcore.site/trunk/src/grokcore/site/subscriber.py (rev 0)
+++ Sandbox/faassen/grokcore.site/trunk/src/grokcore/site/subscriber.py 2008-10-17 18:48:04 UTC (rev 92343)
@@ -0,0 +1,14 @@
+import grokcore.component
+from zope.app.component.site import LocalSiteManager
+from zope.app.container.interfaces import IObjectAddedEvent
+
+from grokcore.site.components import Site
+
+ at grokcore.component.subscribe(Site, IObjectAddedEvent)
+def addSiteHandler(site, event):
+ sitemanager = LocalSiteManager(site)
+ # LocalSiteManager creates the 'default' folder in its __init__.
+ # It's not needed anymore in new versions of Zope 3, therefore we
+ # remove it
+ del sitemanager['default']
+ site.setSiteManager(sitemanager)
More information about the Checkins
mailing list