[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0-broken/src/zope/app/apidoc/viewmodule/__init__.py Gave SkinDocumentation and LayerDocumentation a location upon creation.

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 27 12:24:30 EDT 2004


Log message for revision 27300:
  Gave SkinDocumentation and LayerDocumentation a location upon creation. 
  Now the ftests pass again.
  


Changed:
  U   Zope3/branches/ZopeX3-3.0-broken/src/zope/app/apidoc/viewmodule/__init__.py


-=-
Modified: Zope3/branches/ZopeX3-3.0-broken/src/zope/app/apidoc/viewmodule/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0-broken/src/zope/app/apidoc/viewmodule/__init__.py	2004-08-27 16:19:47 UTC (rev 27299)
+++ Zope3/branches/ZopeX3-3.0-broken/src/zope/app/apidoc/viewmodule/__init__.py	2004-08-27 16:24:30 UTC (rev 27300)
@@ -24,6 +24,7 @@
 from zope.app.apidoc.interfaces import IDocumentationModule
 from zope.app.apidoc.utilities import relativizePath
 from zope.app.i18n import ZopeMessageIDFactory as _
+from zope.app.location import locate
 
 # TODO: Temporary hack, since registering an adapter for a particular class is
 # broken.
@@ -112,6 +113,8 @@
                  for reg in service.registrations()
                  if isinstance(reg, SkinRegistration)]
         skins.sort(lambda x, y: cmp(x.name, y.name))
+        # Make sure skins have a location
+        [locate(skin, self, skin.name) for skin in skins]
         return skins
 
 
@@ -151,6 +154,7 @@
     implements(ISkinDocumentation)
 
     def __init__(self, context):
+        self.__parent__ = context
         self.context = context
 
     # See ISkinDocumentation
@@ -184,6 +188,9 @@
             default = LayerRegistration('default',
                                         'This is a predefined layer.')
             layers.append(ILayerDocumentation(default))
+
+        # Make sure skins have a location
+        [locate(layer, self, layer.name) for layer in layers]
         return layers
         
     # See ISkinDocumentation



More information about the Zope3-Checkins mailing list