[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/ Fix
up zope.app according to new location of BrowserView.
Philipp von Weitershausen
philikon at philikon.de
Thu Apr 6 11:55:21 EDT 2006
Log message for revision 66593:
Fix up zope.app according to new location of BrowserView.
Changed:
U Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.py
U Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/module.py
U Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/tests.py
U Zope3/branches/jim-adapter/src/zope/app/apidoc/ifacemodule/browser.py
U Zope3/branches/jim-adapter/src/zope/app/basicskin/standardmacros.py
U Zope3/branches/jim-adapter/src/zope/app/basicskin/tests/test_standardmacros.py
U Zope3/branches/jim-adapter/src/zope/app/cache/browser/cacheable.py
U Zope3/branches/jim-adapter/src/zope/app/cache/browser/ram.py
U Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/component/browser/registration.py
U Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_editregistration.py
U Zope3/branches/jim-adapter/src/zope/app/container/browser/adding.py
U Zope3/branches/jim-adapter/src/zope/app/container/browser/contents.py
U Zope3/branches/jim-adapter/src/zope/app/container/browser/find.py
U Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_adding.py
U Zope3/branches/jim-adapter/src/zope/app/demo/jobboard/browser.py
U Zope3/branches/jim-adapter/src/zope/app/error/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/externaleditor/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/schemadisplay.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/widget.py
U Zope3/branches/jim-adapter/src/zope/app/form/tests/test_utility.py
U Zope3/branches/jim-adapter/src/zope/app/fssync/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/introspector/browser.py
U Zope3/branches/jim-adapter/src/zope/app/onlinehelp/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/onlinehelp/browser/tree.py
U Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelptopic.py
U Zope3/branches/jim-adapter/src/zope/app/pagetemplate/simpleviewclass.py
U Zope3/branches/jim-adapter/src/zope/app/publication/tests/test_browserpublication.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/directoryresource.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/fileresource.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/managementviewselector.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/menu.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/pagetemplateresource.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resources.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_resources.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/viewmeta.py
U Zope3/branches/jim-adapter/src/zope/app/recorder/browser.py
U Zope3/branches/jim-adapter/src/zope/app/recorder/tests.py
U Zope3/branches/jim-adapter/src/zope/app/renderer/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/renderer/plaintext.py
U Zope3/branches/jim-adapter/src/zope/app/renderer/rest.py
U Zope3/branches/jim-adapter/src/zope/app/renderer/stx.py
U Zope3/branches/jim-adapter/src/zope/app/rotterdam/xmlobject.py
U Zope3/branches/jim-adapter/src/zope/app/schema/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/securitypolicy/browser/tests/test_rolepermissionview.py
U Zope3/branches/jim-adapter/src/zope/app/tree/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/undo/browser.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/contentworkflow.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/definition.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/instance.py
U Zope3/branches/jim-adapter/src/zope/app/zptpage/tests/test_zptpage.py
U Zope3/branches/jim-adapter/src/zope/app/zptpage/zptpage.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -25,9 +25,9 @@
from zope.interface import directlyProvidedBy, directlyProvides
from zope.traversing.interfaces import IPhysicallyLocatable, IContainmentRoot
from zope.location import location
+from zope.publisher.browser import BrowserView
from zope.app import zapi, apidoc, annotation
-from zope.app.publisher.browser import BrowserView
def getTypeLink(type):
if type is types.NoneType:
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/module.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/module.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/module.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -19,10 +19,10 @@
from zope.interface.interface import InterfaceClass
from zope.security.proxy import removeSecurityProxy
from zope.proxy import removeAllProxies
+from zope.publisher.browser import BrowserView
from zope.app import zapi
from zope.app.i18n import ZopeMessageFactory as _
-from zope.app.publisher.browser import BrowserView
from zope.app.apidoc.apidoc import APIDocumentation
from zope.app.apidoc.utilities import getPythonPath, renderText, columnize
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/tests.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/tests.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -109,9 +109,9 @@
os.path.dirname(zope.app.__file__), 'meta.zcml')
# Register the index.html view for codemodule.class_.Class
+ from zope.publisher.browser import BrowserView
from zope.app.apidoc.codemodule.class_ import Class
from zope.app.apidoc.codemodule.browser.class_ import ClassDetails
- from zope.app.publisher.browser import BrowserView
class Details(ClassDetails, BrowserView):
pass
ztapi.browserView(Class, 'index.html', Details)
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/ifacemodule/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/ifacemodule/browser.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/ifacemodule/browser.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -26,12 +26,12 @@
from zope.publisher.interfaces.xmlrpc import IXMLRPCRequest
from zope.publisher.interfaces.http import IHTTPRequest
from zope.publisher.interfaces.ftp import IFTPRequest
+from zope.publisher.browser import BrowserView
from zope.security.proxy import removeSecurityProxy
from zope.proxy import removeAllProxies
from zope.app import zapi
from zope.app.i18n import ZopeMessageFactory as _
-from zope.app.publisher.browser import BrowserView
from zope.app.apidoc.utilities import getPythonPath, renderText
from zope.app.apidoc.apidoc import APIDocumentation
Modified: Zope3/branches/jim-adapter/src/zope/app/basicskin/standardmacros.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/basicskin/standardmacros.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/basicskin/standardmacros.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -20,8 +20,8 @@
__docformat__ = 'restructuredtext'
import zope.interface
-from zope.app import zapi
-from zope.app.publisher.browser import BrowserView
+from zope.component import getMultiAdapter
+from zope.publisher.browser import BrowserView
class Macros(object):
zope.interface.implements(zope.interface.common.mapping.IItemMapping)
@@ -38,7 +38,7 @@
context = self.context
request = self.request
for name in self.macro_pages:
- page = zapi.getMultiAdapter((context, request), name=name)
+ page = getMultiAdapter((context, request), name=name)
try:
v = page[key]
except KeyError:
Modified: Zope3/branches/jim-adapter/src/zope/app/basicskin/tests/test_standardmacros.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/basicskin/tests/test_standardmacros.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/basicskin/tests/test_standardmacros.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -18,13 +18,12 @@
import unittest
from zope.interface import implements, Interface
from zope.publisher.browser import TestRequest
+from zope.publisher.interfaces.browser import IBrowserView
from zope.app.basicskin.standardmacros import Macros
from zope.app.component.testing import PlacefulSetup
-from zope.app.publisher.interfaces.browser import IBrowserView
from zope.app.testing import ztapi
-
class ViewWithMacros(object):
implements(IBrowserView)
Modified: Zope3/branches/jim-adapter/src/zope/app/cache/browser/cacheable.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/cache/browser/cacheable.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/cache/browser/cacheable.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,7 +17,9 @@
"""
__docformat__ = 'restructuredtext'
-from zope.app import zapi
+from zope.component import getMultiAdapter
+from zope.publisher.browser import BrowserView
+
from zope.app.cache.caching import getCacheForObject, getLocationForCache
from zope.app.form.utility import setUpEditWidgets
from zope.app.i18n import ZopeMessageFactory as _
@@ -25,7 +27,6 @@
from zope.app.cache.interfaces import ICacheable
from zope.app.form.interfaces import WidgetInputError
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.publisher.browser import BrowserView
class CacheableView(BrowserView):
@@ -45,8 +46,8 @@
def current_cache_url(self):
"Returns the current cache provider's URL."
cache = getCacheForObject(self.context)
- absolute_url = zapi.getMultiView((cache, self.request),
- name='absolute_url')
+ absolute_url = getMultiAdapter((cache, self.request),
+ name='absolute_url')
try:
return absolute_url()
except TypeError:
Modified: Zope3/branches/jim-adapter/src/zope/app/cache/browser/ram.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/cache/browser/ram.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/cache/browser/ram.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,7 +17,7 @@
"""
__docformat__ = 'restructuredtext'
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
from zope.app.cache.interfaces.ram import IRAMCache
class RAMCacheView(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -15,23 +15,23 @@
$Id$
"""
+import zope.component
from zope.exceptions.interfaces import UserError
from zope.security.proxy import removeSecurityProxy
-from zope.app import zapi
-from zope.app.container.browser.adding import Adding
-from zope.app.i18n import ZopeMessageFactory as _
-from zope.app.container.interfaces import INameChooser
-from zope.app.publisher.browser import BrowserView
-from zope.app.component.interfaces import ISite
-from zope.app.component.site import LocalSiteManager
+from zope.publisher.browser import BrowserView
from zope.component.interfaces import ComponentLookupError
from zope.component.interfaces import IFactory
from zope.interface.interfaces import IMethod
from zope.schema.interfaces import IField
+
+from zope.app.i18n import ZopeMessageFactory as _
+from zope.app.container.interfaces import INameChooser
+from zope.app.container.browser.adding import Adding
from zope.app.interface.interfaces import IInterfaceBasedRegistry
+from zope.app.component.site import LocalSiteManager
+from zope.app.component.interfaces import ISite
+from zope.app.component.interface import getInterface, provideInterface
from zope.app.component.interface import searchInterface
-from zope.app.component.interface import getInterface
-from zope.app.component.interface import provideInterface
class ComponentAdding(Adding):
"""Adding subclass used for registerable components."""
@@ -44,10 +44,10 @@
return self.added_object
def nextURL(self):
- v = zapi.queryMultiAdapter(
+ v = zope.component.queryMultiAdapter(
(self.added_object, self.request), name="registration.html")
if v is not None:
- url = str(zapi.getMultiAdapter(
+ url = str(zope.component.getMultiAdapter(
(self.added_object, self.request), name='absolute_url'))
return url + "/@@registration.html"
@@ -82,7 +82,7 @@
if extra:
factoryname = extra.get('factory')
if factoryname:
- factory = zapi.getUtility(IFactory, factoryname)
+ factory = zope.component.getUtility(IFactory, factoryname)
intf = factory.getInterfaces()
if not intf.extends(self._addFilterInterface):
# We only skip new addMenuItem style objects
@@ -101,10 +101,10 @@
title = _("Add Utility")
def nextURL(self):
- v = zapi.queryMultiAdapter(
+ v = zope.component.queryMultiAdapter(
(self.added_object, self.request), name="addRegistration.html")
if v is not None:
- url = zapi.absoluteURL(self.added_object, self.request)
+ url = zope.component.absoluteURL(self.added_object, self.request)
return url + "/addRegistration.html"
return super(UtilityAdding, self).nextURL()
Modified: Zope3/branches/jim-adapter/src/zope/app/component/browser/registration.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/browser/registration.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/component/browser/registration.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -18,13 +18,13 @@
import warnings
from zope.security.proxy import removeSecurityProxy
+from zope.publisher.browser import BrowserView
from zope.app import zapi
from zope.app.container.browser.adding import Adding
from zope.app.container.interfaces import INameChooser
from zope.app.form.browser.widget import SimpleInputWidget
from zope.app.i18n import ZopeMessageFactory as _
-from zope.app.publisher.browser import BrowserView
from zope.app.component import interfaces
from zope.app.component.interfaces.registration import ActiveStatus
from zope.app.component.interfaces.registration import InactiveStatus
Modified: Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_editregistration.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_editregistration.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_editregistration.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -19,7 +19,7 @@
from zope.traversing.interfaces import IContainmentRoot
from zope.interface import Interface, implements
-from zope.publisher.browser import TestRequest
+from zope.publisher.browser import TestRequest, BrowserView
from zope.app.testing import ztapi
from zope.app.component.browser.registration import EditRegistration
@@ -27,7 +27,6 @@
from zope.app.container.interfaces import IObjectRemovedEvent
from zope.app.component.interfaces.registration import ActiveStatus
from zope.app.site.tests.placefulsetup import PlacefulSetup
-from zope.app.publisher.browser import BrowserView
from zope.app.container.contained import Contained
class Container(dict):
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/adding.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/adding.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/adding.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -26,6 +26,7 @@
from zope.event import notify
from zope.interface import implements
from zope.publisher.interfaces import IPublishTraverse
+from zope.publisher.browser import BrowserView
from zope.security.proxy import removeSecurityProxy
from zope.exceptions.interfaces import UserError
from zope.location import LocationProxy
@@ -38,7 +39,6 @@
from zope.app.event.objectevent import ObjectCreatedEvent
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.publisher.browser import BrowserView
from zope.app.publisher.browser.menu import getMenu
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/contents.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/contents.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/contents.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -24,23 +24,21 @@
from zope.security import canWrite
from zope.size.interfaces import ISized
from zope.traversing.interfaces import TraversalError
+from zope.publisher.browser import BrowserView
from zope.app import zapi
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.publisher.browser import BrowserView
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.dublincore.interfaces import IDCDescriptiveProperties
from zope.app.copypastemove.interfaces import IPrincipalClipboard
-from zope.app.copypastemove.interfaces import IObjectCopier
-from zope.app.copypastemove.interfaces import IObjectMover
+from zope.app.copypastemove.interfaces import IObjectCopier, IObjectMover
from zope.app.copypastemove.interfaces import IContainerItemRenamer
from zope.app.principalannotation.interfaces import IPrincipalAnnotationUtility
from zope.app.container.browser.adding import Adding
-from zope.app.container.interfaces import IContainer
+from zope.app.container.interfaces import IContainer, DuplicateIDError
from zope.app.container.interfaces import IContainerNamesContainer
-from zope.app.container.interfaces import DuplicateIDError
class Contents(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/find.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/find.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/find.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -19,10 +19,10 @@
from zope.traversing.api import getName
from zope.traversing.browser.absoluteurl import absoluteURL
+from zope.publisher.browser import BrowserView
from zope.app.container.find import SimpleIdFindFilter
from zope.app.container.interfaces import IFind
-from zope.app.publisher.browser import BrowserView
# Very simple implementation right now
class Find(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_adding.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_adding.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_adding.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -24,6 +24,7 @@
from zope.interface import implements, Interface, directlyProvides
from zope.publisher.browser import TestRequest
from zope.publisher.interfaces.browser import IBrowserRequest
+from zope.publisher.browser import BrowserView
from zope.security.interfaces import ForbiddenAttribute
from zope.testing.doctestunit import DocTestSuite
from zope.exceptions.interfaces import UserError
@@ -34,7 +35,6 @@
from zope.app import zapi
from zope.app.testing import ztapi
from zope.app.testing.placelesssetup import PlacelessSetup, setUp, tearDown
-from zope.app.publisher.browser import BrowserView
from zope.app.publisher.interfaces.browser import AddMenu
from zope.app.publisher.interfaces.browser import IMenuItemType, IBrowserMenu
from zope.app.publisher.browser.menu import BrowserMenuItem, BrowserMenu
Modified: Zope3/branches/jim-adapter/src/zope/app/demo/jobboard/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/demo/jobboard/browser.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/demo/jobboard/browser.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,12 +17,11 @@
"""
__docformat__ = 'restructuredtext'
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
from zope.event import notify
from zope.app.event.objectevent import ObjectModifiedEvent
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-
from job import Job
class JobCreateView(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/error/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/error/browser/__init__.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/error/browser/__init__.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -15,7 +15,7 @@
$Id$
"""
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
from zope.app import zapi
from zope.app.error.interfaces import IErrorReportingUtility
Modified: Zope3/branches/jim-adapter/src/zope/app/externaleditor/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/externaleditor/browser/__init__.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/externaleditor/browser/__init__.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -15,12 +15,13 @@
"""
__docformat__ = 'restructuredtext'
+from zope.publisher.browser import BrowserView
+from zope.security.proxy import removeSecurityProxy
+
from zope.app import zapi
-from zope.app.publisher.browser import BrowserView
from zope.app.filerepresentation.interfaces import IReadFile
from zope.app.interface import queryType
from zope.app.content.interfaces import IContentType
-from zope.security.proxy import removeSecurityProxy
class ExternalEditor(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/file/browser/file.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -253,8 +253,7 @@
Converts between Unicode strings used in browser forms and 8-bit strings
stored internally.
- >>> from zope.app.publisher.browser import BrowserView
- >>> from zope.publisher.browser import TestRequest
+ >>> from zope.publisher.browser import BrowserView, TestRequest
>>> class FileEditView(FileEdit, BrowserView): pass
>>> view = FileEditView(File(), TestRequest())
>>> view.getData()
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -23,6 +23,7 @@
from zope.interface import Interface
from zope.schema import getFieldNamesInOrder
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+from zope.publisher.browser import BrowserView
from zope.security.checker import defineChecker, NamesChecker
from zope.app import zapi
@@ -33,7 +34,6 @@
from zope.app.form.interfaces import WidgetsError
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
-from zope.app.publisher.browser import BrowserView
from zope.app.form.utility import setUpEditWidgets, applyWidgetsChanges
from zope.app.form.browser.submit import Update
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/schemadisplay.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/schemadisplay.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/schemadisplay.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,14 +17,13 @@
"""
__docformat__ = 'restructuredtext'
+import zope.component
from zope.interface import Interface
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+from zope.publisher.browser import BrowserView
from zope.schema import getFieldNamesInOrder
from zope.security.checker import defineChecker, NamesChecker
-from zope.app import zapi
-from zope.app.publisher.browser import BrowserView
-
from zope.app.form.utility import setUpDisplayWidgets
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
@@ -81,5 +80,5 @@
if layer is None:
layer = IDefaultBrowserLayer
- sm = zapi.getGlobalSiteManager()
+ sm = zope.component.getGlobalSiteManager()
sm.registerAdapter(class_, (for_, layer), Interface, name)
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/widget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/widget.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/widget.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -19,11 +19,11 @@
from xml.sax.saxutils import quoteattr, escape
+from zope.component import getMultiAdapter
from zope.interface import implements
from zope.schema.interfaces import ValidationError
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
-from zope.app import zapi
from zope.app.form import Widget, InputWidget
from zope.app.form.interfaces import ConversionError
from zope.app.form.interfaces import InputErrors
@@ -101,8 +101,8 @@
def error(self):
if self._error:
- return zapi.getMultiAdapter((self._error, self.request),
- IWidgetInputErrorView).snippet()
+ return getMultiAdapter((self._error, self.request),
+ IWidgetInputErrorView).snippet()
return ""
def hidden(self):
Modified: Zope3/branches/jim-adapter/src/zope/app/form/tests/test_utility.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/tests/test_utility.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/form/tests/test_utility.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,27 +17,22 @@
"""
import doctest
+import zope.security.checker
from zope.interface import Interface, implements
from zope.component.interfaces import IViewFactory, ComponentLookupError
-from zope.publisher.browser import TestRequest
-import zope.security.checker
+from zope.publisher.browser import TestRequest, BrowserView
from zope.security.interfaces import ForbiddenAttribute, Unauthorized
-import zope.security.checker
-
from zope.schema import Field, Int, accessors
from zope.schema.interfaces import IField, IInt
from zope.app.testing import ztapi, placelesssetup
-from zope.app.publisher.browser import BrowserView
from zope.app.form import Widget
from zope.app.form.interfaces import IWidget, IInputWidget, IDisplayWidget
from zope.app.form.interfaces import ConversionError, InputErrors, WidgetsError
-
from zope.app.form.utility import no_value, setUpWidget, setUpWidgets
from zope.app.form.utility import setUpEditWidgets, setUpDisplayWidgets
from zope.app.form.utility import getWidgetsData, viewHasInput
from zope.app.form.utility import applyWidgetsChanges
-
from zope.app.form.tests import utils
request = TestRequest()
@@ -537,7 +532,7 @@
>>> setUpWidgets(view, IContent, IWidget, 'prefix', True,
... initial={ "bar":"Bar" },
... context="Alt Context")
- view: <class 'zope.app.publisher.browser.BrowserView'>
+ view: <class 'zope.publisher.browser.BrowserView'>
name: foo
field: <class 'zope.app.form.tests.test_utility.Foo'>
viewType: <class 'zope.interface.interface.InterfaceClass'>
@@ -546,7 +541,7 @@
ignoreStickyValues: True
context: Alt Context
---
- view: <class 'zope.app.publisher.browser.BrowserView'>
+ view: <class 'zope.publisher.browser.BrowserView'>
name: bar
field: <class 'zope.app.form.tests.test_utility.Bar'>
viewType: <class 'zope.interface.interface.InterfaceClass'>
Modified: Zope3/branches/jim-adapter/src/zope/app/fssync/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/fssync/browser/__init__.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/fssync/browser/__init__.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -26,8 +26,8 @@
from zope.traversing.api import getName, getParent, getRoot
from zope.fssync.snarf import Snarfer, Unsnarfer
from zope.fssync.metadata import Metadata
+from zope.publisher.browser import BrowserView
-from zope.app.publisher.browser import BrowserView
from zope.app.fssync import syncer
from zope.app.fssync.committer import Committer, Checker
from zope.app.i18n import ZopeMessageFactory as _
Modified: Zope3/branches/jim-adapter/src/zope/app/introspector/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/introspector/browser.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/introspector/browser.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -20,14 +20,12 @@
from zope.component.interfaces import ComponentLookupError
from zope.interface import directlyProvides, directlyProvidedBy
from zope.proxy import removeAllProxies
+from zope.publisher.browser import BrowserView
from zope.app import zapi
from zope.app.component.interface import getInterface
from zope.app.introspector.interfaces import IIntrospector
-from zope.app.publisher.browser import BrowserView
-
-
class IntrospectorView(BrowserView):
def getIntrospector(self):
Modified: Zope3/branches/jim-adapter/src/zope/app/onlinehelp/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/onlinehelp/browser/__init__.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/onlinehelp/browser/__init__.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -18,11 +18,11 @@
__docformat__ = 'restructuredtext'
from zope.security.proxy import removeSecurityProxy
+from zope.publisher.browser import BrowserView
+from zope.publisher.interfaces.browser import IBrowserView
from zope.app import zapi
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.publisher.browser import BrowserView
-from zope.app.publisher.interfaces.browser import IBrowserView
from zope.app.onlinehelp.interfaces import IOnlineHelpTopic, IOnlineHelp
from zope.app.onlinehelp import getTopicFor
Modified: Zope3/branches/jim-adapter/src/zope/app/onlinehelp/browser/tree.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/onlinehelp/browser/tree.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/onlinehelp/browser/tree.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -18,13 +18,11 @@
__docformat__ = 'restructuredtext'
from zope.i18n import translate
+from zope.publisher.browser import BrowserView
from zope.app import zapi
-from zope.app.publisher.browser import BrowserView
-
from zope.app.onlinehelp.interfaces import IOnlineHelp
-
class OnlineHelpTopicTreeView(BrowserView):
"""Online help topic tree view."""
Modified: Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelptopic.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelptopic.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelptopic.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -389,8 +389,7 @@
r"""Represents a page template based Help Topic which has other
filename extension than `.pt`.
- >>> from zope.publisher.browser import TestRequest
- >>> from zope.app.publisher.browser import BrowserView
+ >>> from zope.publisher.browser import TestRequest, BrowserView
>>> from zope.app.pagetemplate.viewpagetemplatefile import \
... ViewPageTemplateFile
>>> from zope.app.onlinehelp.tests.test_onlinehelp import testdir
@@ -469,11 +468,11 @@
import sys
-from zope.app.publisher.browser import BrowserView
+from zope.interface import implements
+from zope.publisher.browser import BrowserView
from zope.publisher.interfaces.browser import IBrowserPublisher
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from zope.publisher.interfaces import NotFound
-from zope.interface import implements
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
class simple(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/pagetemplate/simpleviewclass.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/pagetemplate/simpleviewclass.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/pagetemplate/simpleviewclass.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -18,11 +18,11 @@
__docformat__ = 'restructuredtext'
import sys
-from zope.app.publisher.browser import BrowserView
+from zope.interface import implements
+from zope.publisher.browser import BrowserView
from zope.publisher.interfaces.browser import IBrowserPublisher
+from zope.publisher.interfaces import NotFound
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.publisher.interfaces import NotFound
-from zope.interface import implements
class simple(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/publication/tests/test_browserpublication.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publication/tests/test_browserpublication.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publication/tests/test_browserpublication.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -24,8 +24,7 @@
from zope.interface import Interface, implements
from zope.publisher.publish import publish
-from zope.publisher.browser import TestRequest
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import TestRequest, BrowserView
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.proxy import getProxiedObject
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/directoryresource.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/directoryresource.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/directoryresource.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -29,7 +29,7 @@
from zope.interface import implements
from zope.publisher.interfaces import NotFound
from zope.security.proxy import Proxy
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.app.publisher.browser.resource import Resource
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/fileresource.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/fileresource.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/fileresource.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -22,8 +22,8 @@
from zope.datetime import time as timeFromDateTimeString
from zope.publisher.interfaces import NotFound
from zope.publisher.interfaces.browser import IBrowserPublisher
+from zope.publisher.browser import BrowserView
-from zope.app.publisher.browser import BrowserView
from zope.app.publisher.fileresource import File, Image
from zope.app.publisher.browser.resource import Resource
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/managementviewselector.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/managementviewselector.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/managementviewselector.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,9 +17,7 @@
"""
from zope.interface import implements
from zope.publisher.interfaces.browser import IBrowserPublisher
-
-from zope.app import zapi
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
from zope.app.publisher.browser.menu import getFirstMenuItem
class ManagementViewSelector(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/menu.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/menu.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/menu.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -18,16 +18,15 @@
__docformat__ = "reStructuredText"
import sys
-from zope.interface import Interface, implements
-from zope.interface import providedBy
+import zope.component
+from zope.interface import Interface, implements, providedBy
from zope.security import checkPermission, canAccess
from zope.security.interfaces import Unauthorized, Forbidden
from zope.security.proxy import removeSecurityProxy
+from zope.publisher.browser import BrowserView
-from zope.app import zapi
from zope.app.pagetemplate.engine import Engine
from zope.app.publication.browser import PublicationTraverser
-from zope.app.publisher.browser import BrowserView
from zope.app.publisher.interfaces.browser import IMenuAccessView
from zope.app.publisher.interfaces.browser import IBrowserMenu
from zope.app.publisher.interfaces.browser import IBrowserMenuItem
@@ -44,13 +43,13 @@
self.description = description
def getMenuItemType(self):
- return zapi.getUtility(IMenuItemType, self.id)
+ return zope.component.getUtility(IMenuItemType, self.id)
def getMenuItems(self, object, request):
"""Return menu item entries in a TAL-friendly form."""
result = []
- for name, item in zapi.getAdapters((object, request),
- self.getMenuItemType()):
+ for name, item in zope.component.getAdapters((object, request),
+ self.getMenuItemType()):
if item.available():
result.append(item)
@@ -173,7 +172,7 @@
def getMenu(id, object, request):
"""Return menu item entries in a TAL-friendly form."""
- menu = zapi.getUtility(IBrowserMenu, id)
+ menu = zope.component.getUtility(IBrowserMenu, id)
return menu.getMenuItems(object, request)
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/pagetemplateresource.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/pagetemplateresource.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/pagetemplateresource.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,9 +17,9 @@
"""
from zope.interface import implements
+from zope.security.proxy import Proxy
from zope.publisher.interfaces import NotFound
-from zope.security.proxy import Proxy
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.app.publisher.pagetemplateresource import PageTemplate
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resources.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resources.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resources.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -18,11 +18,10 @@
import zope.component
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.publisher.interfaces import NotFound
+from zope.publisher.browser import BrowserView
from zope.interface import implements
from zope.location import locate
-from zope.app.publisher.browser import BrowserView
-
class Resources(BrowserView):
"""Provide a URL-accessible resource namespace
"""
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_resources.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_resources.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_resources.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -16,16 +16,16 @@
$Id$
"""
from unittest import TestCase, main, makeSuite
-from zope.app.testing import ztapi
-from zope.app.testing.placelesssetup import PlacelessSetup
from zope.i18n.interfaces import IUserPreferredCharsets
-
from zope.publisher.http import IHTTPRequest
from zope.publisher.http import HTTPCharsets
from zope.publisher.browser import TestRequest
-from zope.app.publisher.interfaces.browser import IBrowserView
+from zope.publisher.interfaces.browser import IBrowserView
+from zope.app.testing import ztapi
+from zope.app.testing.placelesssetup import PlacelessSetup
+
class Test(PlacelessSetup, TestCase):
def setUp(self):
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/viewmeta.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/viewmeta.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/viewmeta.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -20,22 +20,20 @@
from zope.component.interfaces import ComponentLookupError, IDefaultViewName
from zope.interface import implements, classImplements, Interface
from zope.publisher.interfaces import NotFound
-from zope.security.checker import CheckerPublic, Checker
-from zope.security.checker import defineChecker
+from zope.security.checker import CheckerPublic, Checker, defineChecker
from zope.configuration.exceptions import ConfigurationError
-from zope.app.component.interface import provideInterface
from zope.publisher.interfaces.browser import IBrowserRequest
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
from zope.publisher.interfaces.browser import IBrowserPublisher
+from zope.publisher.browser import BrowserView
+
from zope.app import zapi
+from zope.app.component.interface import provideInterface
from zope.app.component.metaconfigure import handler
from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.publisher.browser import BrowserView
from zope.app.publisher.browser.menumeta import menuItemDirective
-
-
# There are three cases we want to suport:
#
# Named view without pages (single-page view)
Modified: Zope3/branches/jim-adapter/src/zope/app/recorder/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/recorder/browser.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/recorder/browser.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -23,15 +23,17 @@
import urllib
import datetime
from cStringIO import StringIO
+
from zope.interface import Interface
from zope.schema import Text
+from zope.publisher.browser import BrowserView
+from zope.publisher.interfaces import NotFound
+
from zope.app.form.utility import setUpWidgets, getWidgetsData
from zope.app.form.interfaces import IInputWidget, WidgetsError
-from zope.app.publisher.browser import BrowserView
from zope.app import recorder
from zope.app.testing import dochttp
from zope.app.i18n import ZopeMessageFactory as _
-from zope.publisher.interfaces import NotFound
class IRecorderSessionsFilterForm(Interface):
Modified: Zope3/branches/jim-adapter/src/zope/app/recorder/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/recorder/tests.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/recorder/tests.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -23,9 +23,8 @@
import unittest
import transaction
from zope.testing import doctest
-from zope.publisher.browser import TestRequest
+from zope.publisher.browser import TestRequest, BrowserView
from zope.app.testing import setup, ztapi
-from zope.app.publisher.browser import BrowserView
def doctest_RecordingProtocol():
Modified: Zope3/branches/jim-adapter/src/zope/app/renderer/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/renderer/__init__.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/renderer/__init__.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,7 +17,7 @@
"""
from zope.component.interfaces import IFactory
from zope.interface import implements, directlyProvides, Declaration
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
from interfaces import ISource, IHTMLRenderer
Modified: Zope3/branches/jim-adapter/src/zope/app/renderer/plaintext.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/renderer/plaintext.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/renderer/plaintext.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -16,8 +16,8 @@
$Id$
"""
from zope.interface import implements
+from zope.publisher.browser import BrowserView
-from zope.app.publisher.browser import BrowserView
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.renderer.interfaces import ISource, IHTMLRenderer
from zope.app.renderer import SourceFactory
Modified: Zope3/branches/jim-adapter/src/zope/app/renderer/rest.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/renderer/rest.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/renderer/rest.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -21,7 +21,8 @@
from docutils.writers.html4css1 import Writer
from zope.interface import implements
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
+
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.renderer.interfaces import ISource, IHTMLRenderer
from zope.app.renderer import SourceFactory
Modified: Zope3/branches/jim-adapter/src/zope/app/renderer/stx.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/renderer/stx.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/renderer/stx.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -20,8 +20,8 @@
from zope.interface import implements
from zope.structuredtext.document import Document
from zope.structuredtext.html import HTML
+from zope.publisher.browser import BrowserView
-from zope.app.publisher.browser import BrowserView
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.renderer.interfaces import ISource, IHTMLRenderer
from zope.app.renderer import SourceFactory
Modified: Zope3/branches/jim-adapter/src/zope/app/rotterdam/xmlobject.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/rotterdam/xmlobject.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/rotterdam/xmlobject.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -23,9 +23,9 @@
from zope.security.interfaces import Unauthorized, Forbidden
from zope.i18n import translate
from zope.traversing.api import getParents, getParent, traverse
+from zope.publisher.browser import BrowserView
from zope.app import zapi
-from zope.app.publisher.browser import BrowserView
from zope.app.container.interfaces import IReadContainer
from zope.app.i18n import ZopeMessageFactory as _
Modified: Zope3/branches/jim-adapter/src/zope/app/schema/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/schema/browser/__init__.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/schema/browser/__init__.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -15,16 +15,15 @@
$Id$
"""
-from zope.app import zapi
+from zope.schema import getFieldNamesInOrder, getFieldsInOrder
+from zope.publisher.browser import BrowserView
+
from zope.app.form.browser.editview import EditView
from zope.app.form.utility import setUpEditWidgets
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.schema.interfaces import IMutableSchema
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.publisher.browser import BrowserView
-from zope.schema import getFieldNamesInOrder, getFieldsInOrder
-
_msg_anErrorOccurred = _("An error occurred")
class EditSchema(BrowserView):
Modified: Zope3/branches/jim-adapter/src/zope/app/securitypolicy/browser/tests/test_rolepermissionview.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/securitypolicy/browser/tests/test_rolepermissionview.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/securitypolicy/browser/tests/test_rolepermissionview.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -20,10 +20,9 @@
import zope.interface
from zope.i18n.interfaces import ITranslationDomain
from zope.i18nmessageid import Message
-from zope.publisher.browser import TestRequest
+from zope.publisher.browser import TestRequest, BrowserView
from zope.exceptions.interfaces import UserError
-from zope.app.publisher.browser import BrowserView
from zope.app.testing import ztapi
from zope.app.security.permission import Permission
from zope.app.security.interfaces import IPermission
Modified: Zope3/branches/jim-adapter/src/zope/app/tree/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/tree/browser/__init__.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/tree/browser/__init__.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -17,14 +17,13 @@
"""
__docformat__ = 'restructuredtext'
+import zope.component
from zope.publisher.interfaces.browser import IBrowserRequest
-from zope.app.rotterdam import Rotterdam
+from zope.publisher.browser import BrowserView
-from zope.app import zapi
-from zope.app.publisher.browser import BrowserView
-
from zope.app.tree.interfaces import ITreeStateEncoder
from zope.app.tree.node import Node
+from zope.app.rotterdam import Rotterdam
class IStaticTreeLayer(IBrowserRequest):
"""Layer that we can register our own navigation macro for."""
@@ -46,7 +45,7 @@
root = self.context
expanded_nodes = []
if tree_state is not None:
- encoder = zapi.getUtility(ITreeStateEncoder)
+ encoder = zope.component.getUtility(ITreeStateEncoder)
expanded_nodes = encoder.decodeTreeState(tree_state)
node = Node(root, expanded_nodes, filter)
node.expand()
Modified: Zope3/branches/jim-adapter/src/zope/app/undo/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/undo/browser.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/undo/browser.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -15,10 +15,9 @@
$Id$
"""
+import zope.component
from zope.security.interfaces import ForbiddenAttribute
-
-from zope.app import zapi
-from zope.app.publisher.browser import BrowserView
+from zope.publisher.browser import BrowserView
from zope.app.undo.interfaces import IUndoManager
class UndoView(BrowserView):
@@ -29,7 +28,7 @@
transaction is an undo transaction.
"""
request = self.request
- undo = zapi.getUtility(IUndoManager)
+ undo = zope.component.getUtility(IUndoManager)
txn_info = undo.getPrincipalTransactions(request.principal, first=0,
last=1)
if txn_info:
@@ -40,7 +39,7 @@
"""Undo the authenticated principal's last transaction and
return where he/she came from"""
request = self.request
- undo = zapi.getUtility(IUndoManager)
+ undo = zope.component.getUtility(IUndoManager)
txn_info = undo.getPrincipalTransactions(request.principal, first=0,
last=1)
if txn_info:
@@ -51,14 +50,14 @@
def undoAllTransactions(self, ids):
"""Undo transactions specified in 'ids'."""
- undo = zapi.getUtility(IUndoManager)
+ undo = zope.component.getUtility(IUndoManager)
undo.undoTransactions(ids)
self._redirect()
def undoPrincipalTransactions(self, ids):
"""Undo transactions that were issued by the authenticated
user specified in 'ids'."""
- undo = zapi.getUtility(IUndoManager)
+ undo = zope.component.getUtility(IUndoManager)
undo.undoPrincipalTransactions(self.request.principal, ids)
self._redirect()
@@ -70,13 +69,13 @@
context = None
if not showall:
context = self.context
- undo = zapi.getUtility(IUndoManager)
+ undo = zope.component.getUtility(IUndoManager)
return undo.getTransactions(context, first, last)
def getPrincipalTransactions(self, first=0, last=-20, showall=False):
context = None
if not showall:
context = self.context
- undo = zapi.getUtility(IUndoManager)
+ undo = zope.component.getUtility(IUndoManager)
return undo.getPrincipalTransactions(self.request.principal, context,
first, last)
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/contentworkflow.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/contentworkflow.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/contentworkflow.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -15,15 +15,16 @@
$Id$
"""
-from zope.app import zapi
+from zope.component import getUtilitiesFor
+from zope.interface import Interface
+from zope.publisher.browser import BrowserView
+from zope.schema import Choice, List
+from zope.security.proxy import removeSecurityProxy
+
from zope.app.component.interface import nameToInterface, interfaceToName
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.form.utility import setUpWidgets
from zope.app.form.interfaces import IInputWidget
-from zope.interface import Interface
-from zope.app.publisher.browser import BrowserView
-from zope.schema import Choice, List
-from zope.security.proxy import removeSecurityProxy
from zope.app.workflow.interfaces import IProcessDefinition
class IContentProcessMapping(Interface):
@@ -56,7 +57,7 @@
def getProcessInterfacesMapping(self):
mapping = []
- for name in [name for name, util in zapi.getUtilitiesFor(
+ for name in [name for name, util in getUtilitiesFor(
IProcessDefinition,
self.context,
)]:
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/definition.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/definition.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/definition.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -15,19 +15,19 @@
$Id$
"""
-from zope.app import zapi
+import zope.component
from zope.proxy import removeAllProxies
-from zope.app.publisher.browser import BrowserView
+from zope.schema import getFields, Choice
+from zope.publisher.browser import BrowserView
+from zope.security.checker import CheckerPublic
+from zope.security.proxy import removeSecurityProxy
+
from zope.app.container.browser.adding import Adding
from zope.app.form.browser.submit import Update
from zope.app.form.browser.editview import EditView
from zope.app.form.interfaces import IInputWidget
from zope.app.workflow.stateful.definition import State, Transition
-from zope.schema import getFields, Choice
-
from zope.app.security.interfaces import IPermission
-from zope.security.checker import CheckerPublic
-from zope.security.proxy import removeSecurityProxy
from zope.app.form.utility import setUpWidget
class StatesContainerAdding(Adding):
@@ -123,8 +123,8 @@
set_perm_id = setPermWidget.getInputValue()
# get the right permission from the given id
- get_perm = zapi.getUtility(IPermission, get_perm_id)
- set_perm = zapi.getUtility(IPermission, set_perm_id)
+ get_perm = zope.component.getUtility(IPermission, get_perm_id)
+ set_perm = zope.component.getUtility(IPermission, set_perm_id)
# set the permission back to the instance
perms[name] = (get_perm, set_perm)
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/instance.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/instance.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/browser/instance.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -15,9 +15,11 @@
$Id$
"""
+from zope.component import getUtility
from zope.proxy import removeAllProxies
from zope.security.proxy import removeSecurityProxy
from zope.schema import getFields
+from zope.publisher.browser import BrowserView
from zope.app import zapi
from zope.app.form.browser.submit import Update
@@ -25,7 +27,6 @@
from zope.app.form.interfaces import IInputWidget
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.dublincore.interfaces import IZopeDublinCore
-from zope.app.publisher.browser import BrowserView
from zope.app.workflow.interfaces import IProcessDefinition
from zope.app.workflow.interfaces import IProcessInstanceContainer
@@ -122,8 +123,8 @@
def _getProcessDefinition(self, processInstance):
- return zapi.getUtility(IProcessDefinition,
- processInstance.processDefinitionName)
+ return getUtility(IProcessDefinition,
+ processInstance.processDefinitionName)
def widgets(self):
Modified: Zope3/branches/jim-adapter/src/zope/app/zptpage/tests/test_zptpage.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/zptpage/tests/test_zptpage.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/zptpage/tests/test_zptpage.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -21,18 +21,16 @@
from zope.interface import directlyProvides
from zope.interface.verify import verifyClass
from zope.security.interfaces import Forbidden
-from zope.publisher.browser import TestRequest
-
+from zope.security.checker import NamesChecker, defineChecker
+from zope.publisher.browser import TestRequest, BrowserView
+from zope.location.traversing import LocationPhysicallyLocatable
from zope.traversing.adapters import Traverser, DefaultTraversable
from zope.traversing.adapters import RootPhysicallyLocatable
from zope.traversing.interfaces import ITraverser, ITraversable
from zope.traversing.interfaces import IPhysicallyLocatable
from zope.traversing.interfaces import IContainmentRoot
-from zope.security.checker import NamesChecker, defineChecker
-from zope.location.traversing import LocationPhysicallyLocatable
from zope.app.testing import ztapi
-from zope.app.publisher.browser import BrowserView
from zope.app.testing.placelesssetup import PlacelessSetup
from zope.app.container.contained import contained
Modified: Zope3/branches/jim-adapter/src/zope/app/zptpage/zptpage.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/zptpage/zptpage.py 2006-04-06 15:53:30 UTC (rev 66592)
+++ Zope3/branches/jim-adapter/src/zope/app/zptpage/zptpage.py 2006-04-06 15:55:12 UTC (rev 66593)
@@ -21,13 +21,14 @@
from zope.interface import implements
from zope.pagetemplate.pagetemplate import PageTemplate
from zope.size.interfaces import ISized
+from zope.publisher.browser import BrowserView
+from zope.app import zapi
from zope.app.pagetemplate.engine import AppPT
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.filerepresentation.interfaces import IReadFile, IWriteFile
from zope.app.filerepresentation.interfaces import IFileFactory
from zope.app.container.contained import Contained
-from zope.app import zapi
from zope.app.publication.interfaces import IFileContent
from interfaces import IZPTPage, IRenderZPTPage
@@ -151,7 +152,6 @@
page.setSource(data.decode('UTF-8'), content_type or 'text/html')
return page
-from zope.app.publisher.browser import BrowserView
class ZPTSourceView(BrowserView):
def __str__(self):
More information about the Zope3-Checkins
mailing list