[Checkins] SVN: grokcore.view/branches/1.2/ create a maintenance branch for grokcore.view-1.2

Jan-Wijbrand Kolman janwijbrand at gmail.com
Fri Nov 28 05:56:56 EST 2008


Log message for revision 93412:
  create a maintenance branch for grokcore.view-1.2

Changed:
  A   grokcore.view/branches/1.2/
  U   grokcore.view/branches/1.2/CHANGES.txt
  U   grokcore.view/branches/1.2/setup.py
  U   grokcore.view/branches/1.2/src/grokcore/view/components.py
  U   grokcore.view/branches/1.2/src/grokcore/view/ftests/staticdir/simple.py
  A   grokcore.view/branches/1.2/src/grokcore/view/ftests/staticdir/simple_fixture/static/subdir/static.pt
  U   grokcore.view/branches/1.2/src/grokcore/view/interfaces.py
  U   grokcore.view/branches/1.2/versions.cfg

-=-
Modified: grokcore.view/branches/1.2/CHANGES.txt
===================================================================
--- grokcore.view/tags/1.2/CHANGES.txt	2008-11-27 23:56:07 UTC (rev 93411)
+++ grokcore.view/branches/1.2/CHANGES.txt	2008-11-28 10:56:55 UTC (rev 93412)
@@ -1,6 +1,15 @@
 Changes
 =======
 
+1.2.1 (unreleased)
+------------------
+
+* Fix the factory for subdirectories of the DirectoryResource implementation
+  by using hooks in zope.app.publihser.browser.directoryresource.
+
+* Update APIs interfaces to include the new ``path`` directive and
+  new ``DirectoryResource`` component.
+
 1.2 (2008-10-16)
 ----------------
 

Modified: grokcore.view/branches/1.2/setup.py
===================================================================
--- grokcore.view/tags/1.2/setup.py	2008-11-27 23:56:07 UTC (rev 93411)
+++ grokcore.view/branches/1.2/setup.py	2008-11-28 10:56:55 UTC (rev 93412)
@@ -12,7 +12,7 @@
 
 setup(
     name='grokcore.view',
-    version='1.2',
+    version='1.2.1dev',
     author='Grok Team',
     author_email='grok-dev at zope.org',
     url='http://grok.zope.org',

Modified: grokcore.view/branches/1.2/src/grokcore/view/components.py
===================================================================
--- grokcore.view/tags/1.2/src/grokcore/view/components.py	2008-11-27 23:56:07 UTC (rev 93411)
+++ grokcore.view/branches/1.2/src/grokcore/view/components.py	2008-11-28 10:56:55 UTC (rev 93412)
@@ -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/1.2/src/grokcore/view/ftests/staticdir/simple.py
===================================================================
--- grokcore.view/tags/1.2/src/grokcore/view/ftests/staticdir/simple.py	2008-11-27 23:56:07 UTC (rev 93411)
+++ grokcore.view/branches/1.2/src/grokcore/view/ftests/staticdir/simple.py	2008-11-28 10:56:55 UTC (rev 93412)
@@ -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/1.2/src/grokcore/view/ftests/staticdir/simple_fixture/static/subdir/static.pt
===================================================================
--- grokcore.view/branches/1.2/src/grokcore/view/ftests/staticdir/simple_fixture/static/subdir/static.pt	                        (rev 0)
+++ grokcore.view/branches/1.2/src/grokcore/view/ftests/staticdir/simple_fixture/static/subdir/static.pt	2008-11-28 10:56:55 UTC (rev 93412)
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h1 tal:content="string:will not be interpreted"/>
+</body>
+</html>

Modified: grokcore.view/branches/1.2/src/grokcore/view/interfaces.py
===================================================================
--- grokcore.view/tags/1.2/src/grokcore/view/interfaces.py	2008-11-27 23:56:07 UTC (rev 93411)
+++ grokcore.view/branches/1.2/src/grokcore/view/interfaces.py	2008-11-28 10:56:55 UTC (rev 93412)
@@ -19,8 +19,9 @@
 
 class IBaseClasses(Interface):
     View = Attribute("Base class for browser views.")
+    DirectoryResource = Attribute("Base class to create new "
+                                  "directory resource.")
 
-
 class IDirectives(Interface):
 
     def layer(layer):
@@ -29,6 +30,11 @@
         This directive acts as a contraint on the 'request' of
         grok.View. This directive can only be used on class level."""
 
+    def path(path):
+        """Declare which path to use on a DirectoryResource.
+
+        This directive can only be used on class level."""
+
     def skin(skin):
         """Declare this layer as a named skin.
 
@@ -52,8 +58,8 @@
     def url(request, obj, name=None, data=None):
         """Generate the URL to an object with optional name attached.
         An optional argument 'data' can be a dictionary that is converted
-        into a query string appended to the URL.
-        """
+        into a query string appended to the URL."""
+
     def PageTemplate(template):
         """Create a Grok PageTemplate object from ``template`` source
         text.  This can be used for inline PageTemplates."""

Modified: grokcore.view/branches/1.2/versions.cfg
===================================================================
--- grokcore.view/tags/1.2/versions.cfg	2008-11-27 23:56:07 UTC (rev 93411)
+++ grokcore.view/branches/1.2/versions.cfg	2008-11-28 10:56:55 UTC (rev 93412)
@@ -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