[Checkins] SVN: grokcore.view/branches/jw-fix-subdirectory-resourcefactory/ Fix the subdirectory bug by using the hooks available in the recent
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Tue Nov 18 17:21:41 EST 2008
Log message for revision 93107:
Fix the subdirectory bug by using the hooks available in the recent
3.5.1 release of zope.app.publisher.
Changed:
U grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/components.py
U grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/ftests/staticdir/simple.py
A grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/ftests/staticdir/simple_fixture/static/subdir/static.pt
U grokcore.view/branches/jw-fix-subdirectory-resourcefactory/versions.cfg
-=-
Modified: grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/components.py
===================================================================
--- grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/components.py 2008-11-18 22:09:22 UTC (rev 93106)
+++ grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/components.py 2008-11-18 22:21:40 UTC (rev 93107)
@@ -247,6 +247,7 @@
# Override this method for the following line, in which our
# custom DirectoryResource class is instantiated.
resource = DirectoryResource(self.__dir, request)
+ resource.directory_factory = DirectoryResourceFactory
resource.__Security_checker__ = self.__checker
resource.__name__ = self.__name
return resource
Modified: grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/ftests/staticdir/simple.py
===================================================================
--- grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/ftests/staticdir/simple.py 2008-11-18 22:09:22 UTC (rev 93106)
+++ grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/ftests/staticdir/simple.py 2008-11-18 22:21:40 UTC (rev 93107)
@@ -45,4 +45,18 @@
>>> print browser.contents
This is yet another file.
+There used to be a bug where subdirectories of the static directory were not
+instances of grokcore.view.component.DirectoryResource and as a result,
+pagetemplate files were actually executed. This is fixed.
+
+ >>> browser.open(
+ ... 'http://localhost/@@/grokcore.view.ftests.staticdir.simple_fixture/'
+ ... 'subdir/static.pt')
+ >>> print browser.contents
+ <html>
+ <body>
+ <h1 tal:content="string:will not be interpreted"/>
+ </body>
+ </html>
+
"""
Added: grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/ftests/staticdir/simple_fixture/static/subdir/static.pt
===================================================================
--- grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/ftests/staticdir/simple_fixture/static/subdir/static.pt (rev 0)
+++ grokcore.view/branches/jw-fix-subdirectory-resourcefactory/src/grokcore/view/ftests/staticdir/simple_fixture/static/subdir/static.pt 2008-11-18 22:21:40 UTC (rev 93107)
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h1 tal:content="string:will not be interpreted"/>
+</body>
+</html>
Modified: grokcore.view/branches/jw-fix-subdirectory-resourcefactory/versions.cfg
===================================================================
--- grokcore.view/branches/jw-fix-subdirectory-resourcefactory/versions.cfg 2008-11-18 22:09:22 UTC (rev 93106)
+++ grokcore.view/branches/jw-fix-subdirectory-resourcefactory/versions.cfg 2008-11-18 22:21:40 UTC (rev 93107)
@@ -48,7 +48,7 @@
zope.app.preference = 3.4.1
zope.app.principalannotation = 3.4
zope.app.publication = 3.4.3
-zope.app.publisher = 3.4.1
+zope.app.publisher = 3.5.1
zope.app.renderer = 3.4
zope.app.rotterdam = 3.4.1
zope.app.schema = 3.4
More information about the Checkins
mailing list