[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - directoryresource.py:1.2 fileresource.py:1.7 pagetemplateresource.py:1.2

Sidnei da Silva sidnei at x3ng.com.br
Mon Sep 22 17:05:14 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv17082/src/zope/app/publisher/browser

Modified Files:
	directoryresource.py fileresource.py pagetemplateresource.py 
Log Message:
Delay creating proxy on Resources. Whitespace cleaning. Include overrides in functional testing

=== Zope3/src/zope/app/publisher/browser/directoryresource.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/publisher/browser/directoryresource.py:1.1	Mon Aug 11 10:58:07 2003
+++ Zope3/src/zope/app/publisher/browser/directoryresource.py	Mon Sep 22 17:05:13 2003
@@ -68,6 +68,7 @@
             raise KeyError, name
         return res
 
+
     def get(self, name, default=_marker):
         path = self.context.path
         filename = os.path.join(path, name)
@@ -77,7 +78,10 @@
             return default
         ext = name.split('.')[-1]
         factory = self.resource_factories.get(ext, self.default_factory)
-        return factory(filename, self.context.checker)(self.request)
+        resource = factory(filename, self.context.checker)(self.request)
+        resource.__parent__ = self
+        resource.__name__ = name
+        return resource
 
 class DirectoryResourceFactory:
 


=== Zope3/src/zope/app/publisher/browser/fileresource.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/publisher/browser/fileresource.py:1.6	Sat Jun  7 01:46:02 2003
+++ Zope3/src/zope/app/publisher/browser/fileresource.py	Mon Sep 22 17:05:13 2003
@@ -119,7 +119,9 @@
         self.__checker = checker
 
     def __call__(self, request):
-        return Proxy(FileResource(self.__file, request), self.__checker)
+        resource = FileResource(self.__file, request)
+        resource.__Security_checker__ = self.__checker
+        return resource
 
 class ImageResourceFactory:
 
@@ -128,4 +130,6 @@
         self.__checker = checker
 
     def __call__(self, request):
-        return Proxy(FileResource(self.__file, request), self.__checker)
+        resource = FileResource(self.__file, request)
+        resource.__Security_checker__ = self.__checker
+        return resource


=== Zope3/src/zope/app/publisher/browser/pagetemplateresource.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/publisher/browser/pagetemplateresource.py:1.1	Mon Aug 11 10:58:07 2003
+++ Zope3/src/zope/app/publisher/browser/pagetemplateresource.py	Mon Sep 22 17:05:13 2003
@@ -49,4 +49,6 @@
         self.__checker = checker
 
     def __call__(self, request):
-        return Proxy(PageTemplateResource(self.__pt, request), self.__checker)
+        resource = PageTemplateResource(self.__pt, request)
+        resource.__Security_checker__ = self.__checker
+        return resource




More information about the Zope3-Checkins mailing list