[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/AbsoluteURL - AbsoluteURL.py:1.1.2.4 config.zcml:1.1.2.3

Jim Fulton jim@zope.com
Thu, 23 May 2002 14:01:50 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/AbsoluteURL
In directory cvs.zope.org:/tmp/cvs-serv26429/lib/python/Zope/App/ZopePublication/AbsoluteURL

Modified Files:
      Tag: Zope-3x-branch
	AbsoluteURL.py config.zcml 
Log Message:
This all started with wanting to be able to use url;view in a ZPT path. :)

That lead me to:

- Massive traversal refactoring.

  Namespace handling is now centralized in Zope.App.Traversing. 

- ZPT refactoring, including some renaming that touches pretty much everything. :)

  - The application specific ZPT support was moved into
    Zope.App.PageTemplate. 

  - To get page template files (for use in views):

    from Zope.App.PageTemplate import ViewPageTemplateFile

  - Fixed up security so that ZPT expressions only have access to 
    safe builtins and so that modules namespace does imports safely.

  - Got ZPTPage working!

- renaming url to absolute_url and got absolute_url to work in paths.

- Cleaned up the (as yet unused) RestrictedInterpreter module in
  Zope.Security. In particular, changed to use a separate
  RestrictedBuiltins module.



=== Zope3/lib/python/Zope/App/ZopePublication/AbsoluteURL/AbsoluteURL.py 1.1.2.3 => 1.1.2.4 ===
             raise TypeError, 'Not enough context information to get a URL'
 
-        return "%s/%s" % (getRequestView(container, 'url', self.__request),
+        return "%s/%s" % (getRequestView(container, 'absolute_url', self.__request),
                           name)
 
     __call__ = __str__


=== Zope3/lib/python/Zope/App/ZopePublication/AbsoluteURL/config.zcml 1.1.2.2 => 1.1.2.3 ===
 
 <browser:view 
-  name="url"
+  name="absolute_url"
   factory=".AbsoluteURL." 
 />
 
@@ -21,7 +21,7 @@
 
 <browser:view 
   for="Zope.App.OFS.Content.Folder.RootFolder.IRootFolder"
-  name="url"
+  name="absolute_url"
   factory=".AbsoluteURL.SiteAbsoluteURL" 
 />