Log message for revision 70927: Merge 70925:70926 from 1.5 branch. Changed: U Products.Five/trunk/CHANGES.txt U Products.Five/trunk/browser/resource.py U Products.Five/trunk/browser/tests/resource_ftest.txt A Products.Five/trunk/browser/tests/resource_subdir/
-=- Modified: Products.Five/trunk/CHANGES.txt =================================================================== --- Products.Five/trunk/CHANGES.txt 2006-10-27 08:39:02 UTC (rev 70926) +++ Products.Five/trunk/CHANGES.txt 2006-10-27 08:41:23 UTC (rev 70927) @@ -2,6 +2,15 @@ Five Changes ============ +Five 1.6 (unreleased) +===================== + +Bugfixes +-------- + +* Port code from Zope 3 making resource directories recursive. + Thanks to Richard Waid. + Five 1.5.1 (unreleased) ======================= @@ -16,6 +25,9 @@ * Fixed #2168: Missing import +* Port code from Zope 3 making resource directories recursive. + Thanks to Richard Waid. + Five 1.5 (2006-08-13) ===================== @@ -95,6 +107,27 @@ deprecated, as the functionality exists in the Zope core publisher from Zope 2.10 and up. +Five 1.4.x +========== + +Bugfixes +-------- + +* browser: processInputs now decodes strings in lists and tuples. + +* formlib: Removed redundant subpageform.pt and backported pageform.pt fixes + from Zope 3. Added missing error view and i18n configuration. + +* Made the __call__ method of ViewMixinForAttributes have the same signature + as the original attribute. This aids some pathological request parameter + marshalling. + +* Backported Zope 2.10's pythonproducts zope app handling to help resolve + an issue with ConnectionStateError's. + +* Port code from Zope 3 making resource directories recursive. + Thanks to Richard Waid. + Five 1.4.1 (2006-08-13) ======================= @@ -117,6 +150,15 @@ * Added acquisition wrappers to viewlets before updating or rendering. +Restructuring +------------- + +* Enabled the viewlet related directives by default. + +* Added Five.browser.pagetemplatefile.ViewPageTemplateFile as an alias + to ZopeTwoPageTemplateFile and as a Zope 2 correspondence to + zope.app.pagetemplate.ViewPageTemplateFile. + Five 1.4 (2006-05-29) ===================== @@ -179,6 +221,16 @@ NOTE: Anyone who copied the Five site.zcml to their $INSTANCE_HOME/etc/ directory is going to need to update it. +Five 1.3.8 (unreleased) +======================= + +Bugfixes +-------- + +* Port code from Zope 3 making resource directories recursive. + Thanks to Richard Waid. + + Five 1.3.7 (2006-08-13) ======================= Modified: Products.Five/trunk/browser/resource.py =================================================================== --- Products.Five/trunk/browser/resource.py 2006-10-27 08:39:02 UTC (rev 70926) +++ Products.Five/trunk/browser/resource.py 2006-10-27 08:41:23 UTC (rev 70927) @@ -213,12 +213,20 @@ def get(self, name, default=_marker): path = self.context.path filename = os.path.join(path, name) - if not os.path.isfile(filename): + isfile = os.path.isfile(filename) + isdir = os.path.isdir(filename) + + if not (isfile or isdir): if default is _marker: raise KeyError(name) return default - ext = name.split('.')[-1] - factory = self.resource_factories.get(ext, self.default_factory) + + if isfile: + ext = name.split('.')[-1] + factory = self.resource_factories.get(ext, self.default_factory) + else: + factory = DirectoryResourceFactory + resource = factory(name, filename)(self.request) resource.__name__ = name resource.__parent__ = self Modified: Products.Five/trunk/browser/tests/resource_ftest.txt =================================================================== --- Products.Five/trunk/browser/tests/resource_ftest.txt 2006-10-27 08:39:02 UTC (rev 70926) +++ Products.Five/trunk/browser/tests/resource_ftest.txt 2006-10-27 08:41:23 UTC (rev 70927) @@ -66,6 +66,18 @@ ... self.assertEquals(200, response.getStatus()) +We also can traverse into sub-directories: + + >>> print http(r''' + ... GET /test_folder_1_/testoid/++resource++fivetest_resources/resource_subdir/resource.txt HTTP/1.1 + ... Authorization: Basic manager:r00t + ... ''') + HTTP/1.1 200 OK + ... + This is a resource in a subdirectory of a normal resource to test traversal. + <BLANKLINE> + + Clean up -------- Copied: Products.Five/trunk/browser/tests/resource_subdir (from rev 70926, Products.Five/branches/1.5/browser/tests/resource_subdir) _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins