[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/configuration - __init__.py:1.12

Steve Alexander steve@cat-box.net
Fri, 13 Jun 2003 13:41:44 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/services/configuration
In directory cvs.zope.org:/tmp/cvs-serv28622/src/zope/app/browser/services/configuration

Modified Files:
	__init__.py 
Log Message:
Removed the @@object_name view, as used in some page templates, and
the ObjectName view and adapter also.
Extended IPhysicallyLocatable with a getName method.
Renamed the convenience function objectName to getName.

If you have page templates that use @@object_name, then you can replace it
with zope:name.



=== Zope3/src/zope/app/browser/services/configuration/__init__.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/browser/services/configuration/__init__.py:1.11	Thu Jun 12 13:03:43 2003
+++ Zope3/src/zope/app/browser/services/configuration/__init__.py	Fri Jun 13 13:41:13 2003
@@ -25,7 +25,7 @@
 from zope.app.interfaces.services.configuration import Unregistered
 from zope.app.interfaces.services.configuration import IUseConfiguration
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.traversing import getPath, objectName, traverse
+from zope.app.traversing import getPath, getName, traverse
 from zope.component import getView, getServiceManager, getAdapter
 from zope.context import getWrapperContainer
 from zope.app.context import ContextWrapper
@@ -214,7 +214,7 @@
             # It must be a component that is about to be configured.
             component = context
             # Always use a relative path (just the component name)
-            path = objectName(context)
+            path = getName(context)
 
         url = getView(component, 'absolute_url', self.request)
 
@@ -236,7 +236,7 @@
         else:
             # It must be a component that is about to be configured.
             # Always return a relative path (just the component name)
-            path = objectName(context)
+            path = getName(context)
 
         return path