[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Publisher/Browser - ViewMeta.py:1.9
Steve Alexander
steve@cat-box.net
Tue, 17 Dec 2002 14:19:37 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Publisher/Browser
In directory cvs.zope.org:/tmp/cvs-serv5078/lib/python/Zope/App/Publisher/Browser
Modified Files:
ViewMeta.py
Log Message:
Added a necessary context method.
Removed extraneous imports.
=== Zope3/lib/python/Zope/App/Publisher/Browser/ViewMeta.py 1.8 => 1.9 ===
--- Zope3/lib/python/Zope/App/Publisher/Browser/ViewMeta.py:1.8 Tue Nov 19 18:25:13 2002
+++ Zope3/lib/python/Zope/App/Publisher/Browser/ViewMeta.py Tue Dec 17 14:19:37 2002
@@ -19,8 +19,7 @@
# XXX this will need to be refactored soon. :)
from Zope.Security.Proxy import Proxy
-from Zope.Security.Checker \
- import CheckerPublic, NamesChecker, Checker
+from Zope.Security.Checker import CheckerPublic, NamesChecker
from Zope.Configuration.INonEmptyDirective import INonEmptyDirective
from Zope.Configuration.ISubdirectiveHandler import ISubdirectiveHandler
@@ -28,17 +27,17 @@
from Zope.Configuration.Exceptions import ConfigurationError
from Zope.Publisher.Browser.IBrowserPresentation import IBrowserPresentation
-from Zope.Publisher.Browser.IBrowserView import IBrowserView
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
-from Zope.App.ComponentArchitecture.metaConfigure \
- import defaultView as _defaultView, handler
+from Zope.App.ComponentArchitecture.metaConfigure import handler
from Zope.App.PageTemplate.SimpleViewClass import SimpleViewClass
from Zope.App.PageTemplate import ViewPageTemplateFile
from ResourceMeta import resource
+from Zope.ContextWrapper import ContextMethod
+
class view(resource):
__class_implements__ = INonEmptyDirective
@@ -277,10 +276,11 @@
return Proxy(getattr(self, attribute),
NamesChecker(__call__=permission)
)
+ publishTraverse = ContextMethod(publishTraverse)
def browserDefault(self, request):
return self, (self._PageTraverser__default, )
-
+ browserDefault = ContextMethod(browserDefault)
def defaultView(_context, name, for_=None, **__kw):