[Zope-Checkins] SVN: Products.Five/trunk/browser/metaconfigure.py I
have fixed this bug 3 times in has many minutes, and just realised
Michael Kerrin
michael.kerrin at openapp.biz
Tue Apr 25 15:42:28 EDT 2006
Log message for revision 67607:
I have fixed this bug 3 times in has many minutes, and just realised
this fix should go on the trunk, has we are just going to get a nameerror
if either the publishTraverse methods are called, since zapi hasn't been
imported.
Changed:
U Products.Five/trunk/browser/metaconfigure.py
-=-
Modified: Products.Five/trunk/browser/metaconfigure.py
===================================================================
--- Products.Five/trunk/browser/metaconfigure.py 2006-04-25 19:38:26 UTC (rev 67606)
+++ Products.Five/trunk/browser/metaconfigure.py 2006-04-25 19:42:27 UTC (rev 67607)
@@ -20,6 +20,7 @@
"""
import os
+from zope import component
from zope.interface import Interface
from zope.configuration.exceptions import ConfigurationError
from zope.publisher.interfaces.browser import IBrowserRequest, \
@@ -192,11 +193,12 @@
if name in pages:
return getattr(self, pages[name])
- view = zapi.queryView(self, name, request)
+ view = component.queryMultiAdapter((self, request), name = name,
+ default = None)
if view is not None:
- return view
+ return view.__of__(self)
- m = class_.publishTraverse.__get__(self)
+ m = class_.publishTraverse.__get__(self).__of__(self)
return m(request, name)
else:
@@ -205,9 +207,10 @@
if name in pages:
return getattr(self, pages[name])
- view = zapi.queryView(self, name, request)
+ view = component.queryMultiAdapter((self, request), name = name,
+ default = None)
if view is not None:
- return view
+ return view.__of__(self)
raise NotFoundError(self, name, request)
More information about the Zope-Checkins
mailing list