[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/ Fix up
zope.formlib and zope.viewlet for new location of zope.traversing
Philipp von Weitershausen
philikon at philikon.de
Wed Apr 5 07:57:12 EDT 2006
Log message for revision 66515:
Fix up zope.formlib and zope.viewlet for new location of zope.traversing
Changed:
U Zope3/branches/jim-adapter/src/zope/formlib/namedtemplate.py
U Zope3/branches/jim-adapter/src/zope/formlib/tests.py
U Zope3/branches/jim-adapter/src/zope/viewlet/DEPENDENCIES.cfg
U Zope3/branches/jim-adapter/src/zope/viewlet/tests.py
U Zope3/branches/jim-adapter/src/zope/viewlet/viewlet.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/formlib/namedtemplate.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/formlib/namedtemplate.py 2006-04-05 11:55:24 UTC (rev 66514)
+++ Zope3/branches/jim-adapter/src/zope/formlib/namedtemplate.py 2006-04-05 11:57:11 UTC (rev 66515)
@@ -16,7 +16,7 @@
"""
from zope import component, interface
-import zope.app.traversing.interfaces
+import zope.traversing.interfaces
class INamedTemplate(interface.Interface):
"""A template that is looked up by name
@@ -67,7 +67,7 @@
# TODO need test
class NamedTemplatePathAdapter(object):
- interface.implements(zope.app.traversing.interfaces.IPathAdapter)
+ interface.implements(zope.traversing.interfaces.IPathAdapter)
def __init__(self, context):
self.context = context
Modified: Zope3/branches/jim-adapter/src/zope/formlib/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/formlib/tests.py 2006-04-05 11:55:24 UTC (rev 66514)
+++ Zope3/branches/jim-adapter/src/zope/formlib/tests.py 2006-04-05 11:57:11 UTC (rev 66515)
@@ -14,21 +14,22 @@
$Id$
"""
-
import unittest
import pytz
+
from zope import component, interface
import zope.interface.common.idatetime
import zope.i18n
import zope.publisher.interfaces
import zope.publisher.interfaces.browser
import zope.schema.interfaces
+import zope.traversing.adapters
+
import zope.app.form.browser
import zope.app.form.browser.exception
import zope.app.form.browser.interfaces
import zope.app.form.interfaces
from zope.app.testing import placelesssetup
-import zope.app.traversing.adapters
from zope.formlib import interfaces, namedtemplate, form
@@ -40,7 +41,7 @@
def pageSetUp(test):
placelesssetup.setUp(test)
component.provideAdapter(
- zope.app.traversing.adapters.DefaultTraversable,
+ zope.traversing.adapters.DefaultTraversable,
[None],
)
@@ -301,10 +302,10 @@
We also need to provide a traversal adapter for the view namespace
that lets us look up the macros.
- >>> import zope.app.traversing.interfaces
+ >>> import zope.traversing.interfaces
>>> class view:
... component.adapts(None, None)
- ... interface.implements(zope.app.traversing.interfaces.ITraversable)
+ ... interface.implements(zope.traversing.interfaces.ITraversable)
... def __init__(self, ob, r=None):
... pass
... def traverse(*args):
@@ -315,7 +316,7 @@
And we have to register the default traversable adapter (I wish we had
push templates):
- >>> from zope.app.traversing.adapters import DefaultTraversable
+ >>> from zope.traversing.adapters import DefaultTraversable
>>> component.provideAdapter(DefaultTraversable, [None])
We need to set up the translation framework. We'll just provide a
Modified: Zope3/branches/jim-adapter/src/zope/viewlet/DEPENDENCIES.cfg
===================================================================
--- Zope3/branches/jim-adapter/src/zope/viewlet/DEPENDENCIES.cfg 2006-04-05 11:55:24 UTC (rev 66514)
+++ Zope3/branches/jim-adapter/src/zope/viewlet/DEPENDENCIES.cfg 2006-04-05 11:57:11 UTC (rev 66515)
@@ -7,3 +7,4 @@
zope.schema
zope.security
zope.tales
+zope.traversing
Modified: Zope3/branches/jim-adapter/src/zope/viewlet/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/viewlet/tests.py 2006-04-05 11:55:24 UTC (rev 66514)
+++ Zope3/branches/jim-adapter/src/zope/viewlet/tests.py 2006-04-05 11:57:11 UTC (rev 66515)
@@ -32,8 +32,8 @@
setup.placefulSetUp()
# resource namespace setup
- from zope.app.traversing.interfaces import ITraversable
- from zope.app.traversing.namespace import resource
+ from zope.traversing.interfaces import ITraversable
+ from zope.traversing.namespace import resource
ztapi.provideAdapter(None, ITraversable, resource, name="resource")
ztapi.provideView(None, None, ITraversable, "resource", resource)
Modified: Zope3/branches/jim-adapter/src/zope/viewlet/viewlet.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/viewlet/viewlet.py 2006-04-05 11:55:24 UTC (rev 66514)
+++ Zope3/branches/jim-adapter/src/zope/viewlet/viewlet.py 2006-04-05 11:57:11 UTC (rev 66515)
@@ -20,15 +20,13 @@
import os
import sys
import zope.interface
+from zope.traversing import api
+from zope.viewlet import interfaces
from zope.app.pagetemplate import simpleviewclass
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from zope.app.publisher.browser import BrowserView
-from zope.app.traversing import api
-from zope.viewlet import interfaces
-
-
class ViewletBase(BrowserView):
"""Viewlet adapter class used in meta directive as a mixin class."""
More information about the Zope3-Checkins
mailing list