[Checkins] SVN: grok/branches/philikon-grokcore.component/src/grok/
Move stuff out of bootstrap() into ZCML. This is stuff that
grok-the-web-application-framework
Philipp von Weitershausen
philikon at philikon.de
Thu Aug 23 20:50:18 EDT 2007
Log message for revision 79198:
Move stuff out of bootstrap() into ZCML. This is stuff that grok-the-web-application-framework
needs. It's not something that's essential to the grokking procedure. Hence the rightful
location, ZCML.
Changed:
U grok/branches/philikon-grokcore.component/src/grok/_grok.py
U grok/branches/philikon-grokcore.component/src/grok/configure.zcml
-=-
Modified: grok/branches/philikon-grokcore.component/src/grok/_grok.py
===================================================================
--- grok/branches/philikon-grokcore.component/src/grok/_grok.py 2007-08-24 00:48:53 UTC (rev 79197)
+++ grok/branches/philikon-grokcore.component/src/grok/_grok.py 2007-08-24 00:50:17 UTC (rev 79198)
@@ -29,16 +29,6 @@
_bootstrapped = False
def bootstrap():
- component.provideAdapter(components.ModelTraverser)
- component.provideAdapter(components.ContainerTraverser)
-
- # register the name 'index' as the default view name
- component.provideAdapter('index',
- adapts=(grok.Model, IBrowserRequest),
- provides=IDefaultViewName)
- component.provideAdapter('index',
- adapts=(grok.Container, IBrowserRequest),
- provides=IDefaultViewName)
# register a subscriber for when grok.Sites are added to make them
# into Zope 3 sites
component.provideHandler(
Modified: grok/branches/philikon-grokcore.component/src/grok/configure.zcml
===================================================================
--- grok/branches/philikon-grokcore.component/src/grok/configure.zcml 2007-08-24 00:48:53 UTC (rev 79197)
+++ grok/branches/philikon-grokcore.component/src/grok/configure.zcml 2007-08-24 00:50:17 UTC (rev 79198)
@@ -1,5 +1,6 @@
<configure
xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser"
xmlns:grok="http://namespaces.zope.org/grok">
<include package="zope.security" file="meta.zcml" />
@@ -28,6 +29,18 @@
<securityPolicy
component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+ <adapter factory=".components.ModelTraverser" />
+ <adapter factory=".components.ContainerTraverser" />
+
+ <browser:defaultView
+ for=".components.Model"
+ name="index"
+ />
+ <browser:defaultView
+ for=".components.Container"
+ name="index"
+ />
+
<!-- we register special IAbsoluteURL views on grok views so that
can have them inspect __view_name__ instead of __name__.
__name__ is already used as the class name, and overriding it
More information about the Checkins
mailing list