[Zope3-checkins] CVS: Zope3/src/zope/app/browser - absoluteurl.py:1.10
Jim Fulton
jim@zope.com
Thu, 12 Jun 2003 05:29:28 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser
In directory cvs.zope.org:/tmp/cvs-serv26206/src/zope/app/browser
Modified Files:
absoluteurl.py
Log Message:
Changed to use zope.app.zapi.
=== Zope3/src/zope/app/browser/absoluteurl.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/browser/absoluteurl.py:1.9 Wed May 28 18:15:46 2003
+++ Zope3/src/zope/app/browser/absoluteurl.py Thu Jun 12 05:29:27 2003
@@ -16,10 +16,10 @@
Revision information:
$Id$
"""
+
+from zope.app import zapi
from zope.publisher.browser import BrowserView
-from zope.context import getWrapperContainer, getInnerWrapperData
from zope.proxy import sameProxiedObjects
-from zope.component import getView
_insufficientContext = ("There isn't enough context to get URL information. "
"This is probably due to a bug in setting up context "
@@ -33,16 +33,16 @@
request = self.request
# We do this here do maintain the rule that we must be wrapped
- container = getWrapperContainer(context)
+ container = zapi.getWrapperContainer(context)
if container is None:
raise TypeError, _insufficientContext
if sameProxiedObjects(context, request.getVirtualHostRoot()):
return request.getApplicationURL()
- url = str(getView(container, 'absolute_url', request))
+ url = str(zapi.getView(container, 'absolute_url', request))
- dict = getInnerWrapperData(context)
+ dict = zapi.getInnerWrapperData(context)
try:
name = dict['name']
except KeyError:
@@ -64,16 +64,16 @@
request = self.request
# We do this here do maintain the rule that we must be wrapped
- container = getWrapperContainer(context)
+ container = zapi.getWrapperContainer(context)
if container is None:
raise TypeError, _insufficientContext
if sameProxiedObjects(context, request.getVirtualHostRoot()):
return ({'name':'', 'url': self.request.getApplicationURL()}, )
- base = getView(container, 'absolute_url', request).breadcrumbs()
+ base = zapi.getView(container, 'absolute_url', request).breadcrumbs()
- dict = getInnerWrapperData(context)
+ dict = zapi.getInnerWrapperData(context)
try:
name = dict['name']
except KeyError:
@@ -106,7 +106,7 @@
url = request.getApplicationURL()
- dict = getInnerWrapperData(context)
+ dict = zapi.getInnerWrapperData(context)
if dict:
name = dict.get('name')
if name:
@@ -129,7 +129,7 @@
base = ({'name':'', 'url': self.request.getApplicationURL()}, )
- dict = getInnerWrapperData(context)
+ dict = zapi.getInnerWrapperData(context)
if dict:
name = dict.get('name')