Author: jmorliaguet
Date: Sat May 27 23:26:18 2006
New Revision: 3254

Modified:
   cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt
   cpsskins/branches/paris-sprint-2006/browser/rendering/renderer.py
   cpsskins/branches/paris-sprint-2006/browser/tree/views.py
   cpsskins/branches/paris-sprint-2006/controllers/themepage.py
   cpsskins/branches/paris-sprint-2006/doc/portlet-rendering.txt
   cpsskins/branches/paris-sprint-2006/doc/setup.txt
   cpsskins/branches/paris-sprint-2006/elements/adapters.py
   cpsskins/branches/paris-sprint-2006/elements/portlet.py
   cpsskins/branches/paris-sprint-2006/ftests/test_appsetup.py
   cpsskins/branches/paris-sprint-2006/setup/README.txt
   cpsskins/branches/paris-sprint-2006/standard/displays/boxgroup.py
   cpsskins/branches/paris-sprint-2006/standard/filters/style/README.txt
   cpsskins/branches/paris-sprint-2006/standard/filters/style/views.py
   cpsskins/branches/paris-sprint-2006/standard/portlets/image/portlet.py
   cpsskins/branches/paris-sprint-2006/standard/portlets/macroslot/portlet.py
   cpsskins/branches/paris-sprint-2006/storage/relations.py
   cpsskins/branches/paris-sprint-2006/storage/storage.py
   cpsskins/branches/paris-sprint-2006/tests/setup.py
   cpsskins/branches/paris-sprint-2006/thememanager.py
   cpsskins/branches/paris-sprint-2006/ui/zmi/views.py
   cpsskins/branches/paris-sprint-2006/utils.py

Log:

- got rid of zope.app.zapi



Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt  
(original)
+++ cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt  Sat May 
27 23:26:18 2006
@@ -74,10 +74,10 @@
     >>> theme2 = addThemeSkeleton(manager, u'Theme 2')
     >>> theme3 = addThemeSkeleton(manager, u'Theme 3')
 
-    >>> from zope.app import zapi
+    >>> from zope.component import getMultiAdapter
     >>> from cpsskins.browser.negotiation.interfaces import INegotiation
-    >>> negotiation = zapi.getMultiAdapter((root, request), INegotiation,
-    ...                                    'negotiation')
+    >>> negotiation = getMultiAdapter((root, request), INegotiation,
+    ...                               name='negotiation')
 
 Themes
 ------

Modified: cpsskins/branches/paris-sprint-2006/browser/rendering/renderer.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/browser/rendering/renderer.py   
(original)
+++ cpsskins/branches/paris-sprint-2006/browser/rendering/renderer.py   Sat May 
27 23:26:18 2006
@@ -19,8 +19,8 @@
 
 import logging
 
-from zope.app.zapi import getMultiAdapter, queryMultiAdapter
-from zope.component import adapts, queryUtility
+from zope.component import adapts, queryUtility, getMultiAdapter
+from zope.component import queryMultiAdapter
 from zope.interface import implements
 from zope.publisher.interfaces import IRequest
 

Modified: cpsskins/branches/paris-sprint-2006/browser/tree/views.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/browser/tree/views.py   (original)
+++ cpsskins/branches/paris-sprint-2006/browser/tree/views.py   Sat May 27 
23:26:18 2006
@@ -17,16 +17,16 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.app import zapi
+from zope.component import getMultiAdapter
 from zope.publisher.browser import BrowserView
 from zope.app.container.browser.adding import Adding
 from zope.app.copypastemove.interfaces import IObjectCopier, IObjectMover
-from zope.traversing.api import getParent
+from zope.traversing.api import getName, getParent
 from zope.interface import implements
 
-from cpsskins.browser.tree.interfaces import (
-    INodeAdding, INodeRemoving, INodeOrdering, INodeMoving, INodeDuplicating
-    )
+from cpsskins.browser.tree.interfaces import INodeAdding, INodeRemoving
+from cpsskins.browser.tree.interfaces import INodeOrdering, INodeMoving
+from cpsskins.browser.tree.interfaces import INodeDuplicating
 
 class NodeAdding(Adding):
     """A view for adding element into nodes
@@ -53,7 +53,7 @@
 
     def remove(self, content):
         container = self.context
-        del container[zapi.name(content)]
+        del container[getName(content)]
 
 class NodeOrdering(BrowserView):
     """A view for managing elements' order in nodes
@@ -63,14 +63,14 @@
     def setOrder(self, node, order):
         container = self.context
         contents = list(container.keys())
-        item = zapi.name(node)
+        item = getName(node)
         contents.remove(item)
         contents.insert(order, item)
         container.updateOrder(contents)
 
     def getOrder(self, node):
         container = self.context
-        item = zapi.name(node)
+        item = getName(node)
         return list(container.keys()).index(item)
 
 class NodeDuplicating(BrowserView):
@@ -83,13 +83,13 @@
         container = self.context
         # save the element's order
         order = list(container.keys())
-        content_order = order.index(zapi.name(content))
+        content_order = order.index(getName(content))
         # duplicate the element
         copier = IObjectCopier(content)
         copied_name = copier.copyTo(container)
         copied = container[copied_name]
         # move the copied element just below the original element
-        ordering = zapi.getMultiAdapter((container, request), INodeOrdering)
+        ordering = getMultiAdapter((container, request), INodeOrdering)
         ordering.setOrder(copied, int(content_order)+1)
         return copied.identifier
 

Modified: cpsskins/branches/paris-sprint-2006/controllers/themepage.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/controllers/themepage.py        
(original)
+++ cpsskins/branches/paris-sprint-2006/controllers/themepage.py        Sat May 
27 23:26:18 2006
@@ -18,7 +18,7 @@
 __docformat__ = "reStructuredText"
 
 from zope.interface import implements
-from zope.app import zapi
+from zope.traversing.api import getName, getParent
 
 from cpsskins.controllers import Controller
 from cpsskins.controllers.interfaces import IController
@@ -38,8 +38,8 @@
         if tmutil.getDefaultPage() is None:
             tmutil.setAsDefault(element)
 
-        theme = zapi.getParent(element)
-        theme.registerUtility(element, IThemePage, zapi.getName(element))
+        theme = getParent(element)
+        theme.registerUtility(element, IThemePage, getName(element))
 
         IPresentable(element).addPresentation()
 
@@ -49,5 +49,5 @@
         element = self.element
         getThemeManager(element).removeDisplays(element)
 
-        theme = zapi.getParent(element)
-        theme.unregisterUtility(element, IThemePage, zapi.getName(element))
+        theme = getParent(element)
+        theme.unregisterUtility(element, IThemePage, getName(element))

Modified: cpsskins/branches/paris-sprint-2006/doc/portlet-rendering.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/doc/portlet-rendering.txt       
(original)
+++ cpsskins/branches/paris-sprint-2006/doc/portlet-rendering.txt       Sat May 
27 23:26:18 2006
@@ -8,7 +8,7 @@
 
     >>> from pprint import pprint
     >>> from zope.app.testing import ztapi
-    >>> from zope.app.zapi import getMultiAdapter
+    >>> from zope.component import getMultiAdapter
 
     >>> from zope.publisher.browser import TestRequest
     >>> from zope.publisher.interfaces import IRequest
@@ -193,9 +193,8 @@
     >>> from cpsskins.standard.formats.widget import IWidget
     >>> from cpsskins.browser.rendering.interfaces import IFilterView
 
-    >>> from zope.app import zapi
-
-    >>> gsm = zapi.getGlobalSiteManager()
+    >>> from zope.component import getGlobalSiteManager
+    >>> gsm = getGlobalSiteManager()
     >>> gsm.registerAdapter(WidgetFilter, (IWidget,), IFilterView)
 
     >>> def test_render(widget, rendered, info):

Modified: cpsskins/branches/paris-sprint-2006/doc/setup.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/doc/setup.txt   (original)
+++ cpsskins/branches/paris-sprint-2006/doc/setup.txt   Sat May 27 23:26:18 2006
@@ -40,8 +40,8 @@
 
 and it is registered as a global utility in metaconfigure.py::
 
-    >>> from zope.api import zapi
-    >>> gsm = zapi.getGlobalSiteManager()
+    >>> from zope.component import getGlobalSiteManager
+    >>> gsm = getGlobalSiteManager()
 
     >>> name = u'K shortcut'
 

Modified: cpsskins/branches/paris-sprint-2006/elements/adapters.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/elements/adapters.py    (original)
+++ cpsskins/branches/paris-sprint-2006/elements/adapters.py    Sat May 27 
23:26:18 2006
@@ -17,9 +17,9 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.app.zapi import getParent
 from zope.component import adapts
 from zope.interface import implements
+from zope.traversing.api import getParent
 
 from cpsskins.elements.interfaces import IElement, INode
 from cpsskins.elements.interfaces import ILeaf, INodeTraverser

Modified: cpsskins/branches/paris-sprint-2006/elements/portlet.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/elements/portlet.py     (original)
+++ cpsskins/branches/paris-sprint-2006/elements/portlet.py     Sat May 27 
23:26:18 2006
@@ -18,12 +18,12 @@
 __docformat__ = "reStructuredText"
 
 from persistent import Persistent
-from zope.app import zapi
+
 from zope.app.container.contained import Contained
 from zope.copypastemove import ObjectMover
 from zope.copypastemove.interfaces import IObjectMover
-from zope.traversing.api import getParent
 from zope.interface import implements
+from zope.traversing.api import getName, getParent
 
 from cpsskins.elements.interfaces import IPortlet, ISlot, IDisplayable
 from cpsskins.ontology import hasPortlet, hasPortletFromPerspective
@@ -107,8 +107,7 @@
             src_display.remove(portlet)
             dest_display = 
IDisplayable(target).getEffectiveDisplay(perspective)
             dest_display.append(portlet)
-
-            return zapi.name(portlet)
+            return getName(portlet)
         else:
             # Use copypastemove's object mover explicitly
             mover = ObjectMover(portlet)

Modified: cpsskins/branches/paris-sprint-2006/ftests/test_appsetup.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ftests/test_appsetup.py (original)
+++ cpsskins/branches/paris-sprint-2006/ftests/test_appsetup.py Sat May 27 
23:26:18 2006
@@ -19,11 +19,11 @@
 
 import unittest
 
-from zope.app import zapi
+from zope.app.content.interfaces import IContentType
 from zope.app.testing.functional import FunctionalDocFileSuite
-from zope.interface import alsoProvides, Interface
+from zope.component import getGlobalSiteManager
 from zope.component.interfaces import IFactory
-from zope.app.content.interfaces import IContentType
+from zope.interface import alsoProvides, Interface
 
 from cpsskins.setup.interfaces import IIdentifiable, IType
 from cpsskins.setup.io.interfaces import IDOMAdapter
@@ -31,7 +31,7 @@
 from cpsskins.setup.test.dummy import DummyFactory, Identifiable, Type
 
 def setUp(test):
-    gsm = zapi.getGlobalSiteManager()
+    gsm = getGlobalSiteManager()
     # export adapters
     gsm.registerAdapter(DummyDOMAdapter, (IDummyResource, Interface),
                         IDOMAdapter)

Modified: cpsskins/branches/paris-sprint-2006/setup/README.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/setup/README.txt        (original)
+++ cpsskins/branches/paris-sprint-2006/setup/README.txt        Sat May 27 
23:26:18 2006
@@ -457,12 +457,11 @@
 The last part of the URI is the resource's identifier as it is used in a
 relation (cf. cpsskins.relations.interfaces.IRelatable).
 
-    >>> from zope.app import zapi
-
     >>> from cpsskins.relations.interfaces import IRelatable
     >>> from cpsskins.elements.interfaces import IElement
 
-    >>> gsm = zapi.getGlobalSiteManager()
+    >>> from zope.component import getGlobalSiteManager
+    >>> gsm = getGlobalSiteManager()
 
     >>> resource = Style()
     >>> root[u'style-2'] = resource

Modified: cpsskins/branches/paris-sprint-2006/standard/displays/boxgroup.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/displays/boxgroup.py   
(original)
+++ cpsskins/branches/paris-sprint-2006/standard/displays/boxgroup.py   Sat May 
27 23:26:18 2006
@@ -45,11 +45,11 @@
 class BoxGroup(Persistent, Display):
     """A Box Group is used to display a group of portlets.
 
-    >>> from zope.app import zapi
+    >>> from zope.component import getGlobalSiteManager
     >>> from cpsskins.thememanager import ThemeManagementFolder
     >>> from cpsskins.thememanager import IThemeManagementFolder
 
-    >>> gsm = zapi.getGlobalSiteManager()
+    >>> gsm = getGlobalSiteManager()
     >>> gsm.registerUtility(ThemeManagementFolder(), IThemeManagementFolder,
     ...                     name=u'themes')
 

Modified: cpsskins/branches/paris-sprint-2006/standard/filters/style/README.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/filters/style/README.txt       
(original)
+++ cpsskins/branches/paris-sprint-2006/standard/filters/style/README.txt       
Sat May 27 23:26:18 2006
@@ -5,7 +5,6 @@
 STYLE FILTER
 ============
 
-    >>> from zope.app import zapi
     >>> from zope.component import getUtility
 
     >>> from cpsskins.setup.interfaces import IResourceManager

Modified: cpsskins/branches/paris-sprint-2006/standard/filters/style/views.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/filters/style/views.py 
(original)
+++ cpsskins/branches/paris-sprint-2006/standard/filters/style/views.py Sat May 
27 23:26:18 2006
@@ -17,10 +17,10 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.app import zapi
 from zope.app.cache.ram import RAMCache
 from zope.app.session.interfaces import ISession
 from zope.component import getUtility
+from zope.traversing.api import getPath
 
 from cpsskins import configuration
 from cpsskins import minjson as json
@@ -63,7 +63,7 @@
         return markup
 
     def getModelDef(self):
-        path = zapi.getPath(self.context)
+        path = getPath(self.context)
         return json.write({
             'id': 'style-editor',
             'storage': {
@@ -97,7 +97,7 @@
         })
 
     def getFormDef(self):
-        path = zapi.getPath(self.context)
+        path = getPath(self.context)
         return json.write({
             'id': 'style-editor-form',
             'widget': {

Modified: cpsskins/branches/paris-sprint-2006/standard/portlets/image/portlet.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/portlets/image/portlet.py      
(original)
+++ cpsskins/branches/paris-sprint-2006/standard/portlets/image/portlet.py      
Sat May 27 23:26:18 2006
@@ -17,12 +17,12 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.app import zapi
 from zope.app.file.image import Image as ImageFile
 from zope.app.file.interfaces import IImage as IImageFile
 from zope.interface import implements
 from zope.schema import TextLine, Bytes, BytesLine
 from zope.i18nmessageid import MessageFactory
+from zope.traversing.api import getPath
 
 from cpsskins import Portlet
 from cpsskins.interfaces import IPortlet
@@ -66,7 +66,7 @@
     def __call__(self, info):
         path = u''
         if self.data:
-            path = zapi.getPath(self)
+            path = getPath(self)
 
         info.data = ImageModel(path=path)
         info.metadata = {'title': self.title, 'link': self.link}

Modified: 
cpsskins/branches/paris-sprint-2006/standard/portlets/macroslot/portlet.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/portlets/macroslot/portlet.py  
(original)
+++ cpsskins/branches/paris-sprint-2006/standard/portlets/macroslot/portlet.py  
Sat May 27 23:26:18 2006
@@ -17,10 +17,10 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.app import zapi
-from zope.publisher.browser import applySkin
+from zope.component import getMultiAdapter
 from zope.interface import implements
 from zope.i18nmessageid import MessageFactory
+from zope.publisher.browser import applySkin
 
 from cpsskins import Portlet
 from cpsskins.interfaces import IPortlet
@@ -53,8 +53,8 @@
             # Render the view
             markup = template(instance=view)
         else:
-            macro_slot_editor = zapi.queryMultiAdapter(
-                (self, request), name=u'macroSlotEditor')
+            macro_slot_editor = queryMultiAdapter((self, request),
+                                                  name=u'macroSlotEditor')
             markup = macro_slot_editor(info)
 
         return markup

Modified: cpsskins/branches/paris-sprint-2006/storage/relations.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/storage/relations.py    (original)
+++ cpsskins/branches/paris-sprint-2006/storage/relations.py    Sat May 27 
23:26:18 2006
@@ -21,7 +21,6 @@
 
 from BTrees.OOBTree import OOBTree
 
-from zope.app import zapi
 from zope.app.container.btree import BTreeContainer
 from zope.app.container.constraints import contains
 from zope.app.container.interfaces import INameChooser
@@ -29,6 +28,7 @@
 from zope.interface import implements
 from zope.proxy import isProxy
 from zope.security.proxy import removeSecurityProxy
+from zope.traversing.api import getName
 
 from cpsskins.relations.interfaces import IRelation, IRelatable, IPredicate
 from cpsskins.relations.interfaces import IProxyPredicate
@@ -280,7 +280,7 @@
         """
         self._clearIndexes()
         for relation in list(self.values()):
-            id = zapi.name(LocationPhysicallyLocatable(relation))
+            id = getName(LocationPhysicallyLocatable(relation))
             self._indexRelates(relation, id)
         self._p_changed = True
 

Modified: cpsskins/branches/paris-sprint-2006/storage/storage.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/storage/storage.py      (original)
+++ cpsskins/branches/paris-sprint-2006/storage/storage.py      Sat May 27 
23:26:18 2006
@@ -17,15 +17,15 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.app import zapi
 from zope.app.container.btree import BTreeContainer
 from zope.app.container.contained import Contained
 from zope.app.container.contained import ObjectAddedEvent
 from zope.app.container.interfaces import INameChooser
-from zope.lifecycleevent import ObjectCopiedEvent
-from zope.location.pickling import locationCopy
 from zope.event import notify
 from zope.interface import implements
+from zope.lifecycleevent import ObjectCopiedEvent
+from zope.location.pickling import locationCopy
+from zope.traversing.api import getName
 
 from cpsskins.elements.interfaces import IElement
 from cpsskins.storage.interfaces import IStorage
@@ -51,7 +51,7 @@
             objects = [objects]
         for obj in objects:
             if IElement.providedBy(obj):
-                obj = zapi.name(obj)
+                obj = getName(obj)
             if obj not in self:
                 raise KeyError("%s not in the storage." % obj)
             del self[obj]
@@ -61,7 +61,7 @@
 
         Return the object of the duplication.
         """
-        name = zapi.name(object)
+        name = getName(object)
         if name not in self:
             raise KeyError("%s not in the storage." % object)
 

Modified: cpsskins/branches/paris-sprint-2006/tests/setup.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/tests/setup.py  (original)
+++ cpsskins/branches/paris-sprint-2006/tests/setup.py  Sat May 27 23:26:18 2006
@@ -17,14 +17,14 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.app import zapi
-from zope.app.testing import setup
-from zope.traversing.interfaces import IPathAdapter
-from zope.lifecycleevent.interfaces import IObjectCreatedEvent
-from zope.lifecycleevent.interfaces import IObjectModifiedEvent
 from zope.app.container.interfaces import IObjectAddedEvent, 
IObjectRemovedEvent
 from zope.app.container.interfaces import INameChooser, IWriteContainer
 from zope.app.container.contained import NameChooser
+from zope.app.testing import setup
+from zope.component import getGlobalSiteManager
+from zope.lifecycleevent.interfaces import IObjectCreatedEvent
+from zope.lifecycleevent.interfaces import IObjectModifiedEvent
+from zope.traversing.interfaces import IPathAdapter
 
 from cpsskins import controllers, elements
 from cpsskins.elements.display import Displayable
@@ -46,7 +46,7 @@
 from cpsskins.thememanager import IThemeManagementFolder, ThemeManagementFolder
 
 def setUp(test):
-    gsm = zapi.getGlobalSiteManager()
+    gsm = getGlobalSiteManager()
 
     # adapters
     gsm.registerAdapter(Formattable, (IDisplay,), IPathAdapter, 'formattable')

Modified: cpsskins/branches/paris-sprint-2006/thememanager.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/thememanager.py (original)
+++ cpsskins/branches/paris-sprint-2006/thememanager.py Sat May 27 23:26:18 2006
@@ -19,11 +19,10 @@
 
 import logging
 
-from zope.app import zapi
 from zope.app.container.interfaces import INameChooser
 from zope.component import getUtility
 from zope.component.persistentregistry import PersistentComponents
-from zope.traversing.api import getParent
+from zope.traversing.api import getName, getParent
 from zope.interface import implements, Interface
 from zope.i18nmessageid import MessageFactory
 from zope.schema import TextLine
@@ -271,7 +270,7 @@
         for k, v in self.getUtilitiesFor(ITheme):
             if k == name:
                 self.unregisterUtility(v, ITheme, k)
-                del self[zapi.getName(v)]
+                del self[getName(v)]
                 print 'deleted' + k
                 return
 
@@ -280,7 +279,7 @@
     def deleteAllThemes(self):
         for k, v in self.getUtilitiesFor(ITheme):
             self.unregisterUtility(v, ITheme, k)
-            del self[zapi.getName(v)]
+            del self[getName(v)]
 
     def getThemeByName(self, name=u''):
         """Return a theme by its name.
@@ -342,7 +341,7 @@
         for rel in display_relations:
             display = reltool.get(rel).second
             container = getParent(display)
-            del container[zapi.name(display)]
+            del container[getName(display)]
 
         # Remove the relation
         reltool.remove(display_relations)
@@ -357,7 +356,7 @@
         # Physically remove the formats
         for format in IFormattable(object).getFormats():
             container = getParent(format)
-            del container[zapi.name(format)]
+            del container[getName(format)]
 
         # Remove the relation
         reltool = IRelationTool(object)

Modified: cpsskins/branches/paris-sprint-2006/ui/zmi/views.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/zmi/views.py (original)
+++ cpsskins/branches/paris-sprint-2006/ui/zmi/views.py Sat May 27 23:26:18 2006
@@ -17,11 +17,10 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.app import zapi
-from zope.component import getSiteManager
+from zope.component import getSiteManager, getMultiAdapter
 from zope.interface import implements, Interface
 from zope.security.proxy import removeSecurityProxy
-from zope.traversing.api import getParent
+from zope.traversing.api import getName, getParent
 
 from cpsskins.ui.screens.common.views import IAuthoring
 from cpsskins.utils import getThemeManager, addThemeSkeleton
@@ -83,12 +82,11 @@
 
     def listThemeInfo(self):
         info = []
-        edit_url = '/++skin++cpsskins%s/editTheme.html' % \
-                   zapi.getPath(self.context)
+        edit_url = '/++skin++cpsskins%s/editTheme.html' % getPath(self.context)
         for theme in self.getThemes():
-            path = zapi.getPath(theme)
+            path = getPath(theme)
             info.append({
-                'id': zapi.name(theme),
+                'id': getName(theme),
                 'title': theme.title,
                 'edit_url': '%s?name=%s' % (edit_url, theme.name)
                 })
@@ -99,7 +97,7 @@
         """
         context = self.context
         request = self.request
-        authoring = zapi.getMultiAdapter((context, request), IAuthoring,
+        authoring = getMultiAdapter((context, request), IAuthoring,
                                          name='authoring')
         authoring.setWorkTheme(name)
         request.response.redirect('./@@editor.html')

Modified: cpsskins/branches/paris-sprint-2006/utils.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/utils.py        (original)
+++ cpsskins/branches/paris-sprint-2006/utils.py        Sat May 27 23:26:18 2006
@@ -20,7 +20,7 @@
 import re
 
 from zope.component import getSiteManager, getGlobalSiteManager
-from zope.app.zapi import getParent
+from zope.traversing.api import getParent
 
 from cpsskins.thememanager import IThemeManagementFolder
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to