[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - resource.py:1.14

Philipp von Weitershausen philikon at philikon.de
Mon May 10 02:35:39 EDT 2004


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

Modified Files:
	resource.py 
Log Message:


Query absolute url view by interface, not by name.




=== Zope3/src/zope/app/publisher/browser/resource.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/publisher/browser/resource.py:1.13	Sat Mar 13 16:03:18 2004
+++ Zope3/src/zope/app/publisher/browser/resource.py	Mon May 10 02:35:38 2004
@@ -21,11 +21,11 @@
 from zope.app.location import Location
 from zope.app.site.interfaces import ISite
 from zope.app.traversing.interfaces import IContainmentRoot
+from zope.app.traversing.browser.interfaces import IAbsoluteURL
 from zope.component.interfaces import IResource
 from zope.interface import implements
 
 class Resource(Location):
-
     implements(IResource)
 
     def __init__(self, request):
@@ -39,7 +39,7 @@
         names.append(name)
 
         site = self.__parent__
-        while 1:
+        while True:
             if ISite.providedBy(site):
                 break
             if IContainmentRoot.providedBy(site):
@@ -51,5 +51,5 @@
 
         names.reverse()
         name = '/'.join(filter(None, names))
-        url = str(zapi.getView(site, 'absolute_url', self.request))
+        url = str(zapi.getViewProviding(site, IAbsoluteURL, self.request))
         return "%s/@@/%s" % (url, name)




More information about the Zope3-Checkins mailing list