[Checkins] SVN: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/z the directory_factory can be a method in this case

Jan-Wijbrand Kolman janwijbrand at gmail.com
Tue Nov 23 06:59:21 EST 2010


Log message for revision 118529:
  the directory_factory can be a method in this case

Changed:
  U   hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/zcml.py
  U   hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/zopesupport.py

-=-
Modified: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/zcml.py
===================================================================
--- hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/zcml.py	2010-11-23 11:54:49 UTC (rev 118528)
+++ hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/zcml.py	2010-11-23 11:59:20 UTC (rev 118529)
@@ -19,8 +19,7 @@
         'request',
         )
     checker = NamesChecker(allowed_names)
-    factory = HurryDirectoryResourceFactory(library, checker)
-    return factory
+    return HurryDirectoryResourceFactory(library, checker)
 
 def action_setup(_context):
     """Publish all hurry.resource library entry points as resources.

Modified: hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/zopesupport.py
===================================================================
--- hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/zopesupport.py	2010-11-23 11:54:49 UTC (rev 118528)
+++ hurry.zoperesource/branches/janjaapdriessen-wsgi/src/hurry/zoperesource/zopesupport.py	2010-11-23 11:59:20 UTC (rev 118529)
@@ -69,6 +69,10 @@
 
     implements(IHurryResource)
 
+    def directory_factory(self, path, checker, name):
+        directory_resource = DirectoryResourceFactory(path, checker, name)
+        return hurrify(directory_resource, self.library)
+        
     def get(self, name, *args, **kw):
         resource = super(DirectoryResource, self).get(name, *args, **kw)
         return hurrify(resource, self.library)
@@ -81,14 +85,6 @@
         resource = super(DirectoryResourceFactory, self).__call__(request)
         return hurrify(resource, self.library)
 
-# Close the cirular relationship between resource and resource factory
-# for directories.
-def directory_resource_factory(self, path, checker, name):
-    directory_resource = DirectoryResourceFactory(path, checker, name)
-    return hurrify(directory_resource, self.library)
-
-DirectoryResource.directory_factory = directory_resource_factory
-
 # "Top-level" directory resource factory, that allows us to inject the
 # library object. This, with the custom DirectoryResource(Factory)
 # implementation then is used to inject the libary object as an



More information about the checkins mailing list