[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/introspector/browser.py
fix modify functionality of introspector:
Dominik Huber
dominik.huber at projekt01.ch
Thu Feb 17 06:30:46 EST 2005
Log message for revision 29173:
fix modify functionality of introspector:
question: should I write a trusted adapter providing the modify functionality to get rid of proxy-stuff inside the view?
todo: ftest
Changed:
U Zope3/trunk/src/zope/app/introspector/browser.py
-=-
Modified: Zope3/trunk/src/zope/app/introspector/browser.py
===================================================================
--- Zope3/trunk/src/zope/app/introspector/browser.py 2005-02-16 22:50:38 UTC (rev 29172)
+++ Zope3/trunk/src/zope/app/introspector/browser.py 2005-02-17 11:30:46 UTC (rev 29173)
@@ -17,14 +17,17 @@
"""
__docformat__ = 'restructuredtext'
-from zope.app.publisher.browser import BrowserView
-from zope.app.introspector.interfaces import IIntrospector
-from zope.app import zapi
from zope.component.exceptions import ComponentLookupError
from zope.interface import directlyProvides, directlyProvidedBy
+from zope.proxy import removeAllProxies
+
+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):
@@ -47,12 +50,12 @@
if "add_%s" % interface in self.request:
ob = self.context
interface = getInterface(ob, interface)
- directlyProvides(ob, directlyProvidedBy(ob), interface)
+ directlyProvides(removeAllProxies(ob), directlyProvidedBy(ob), interface)
if 'REMOVE' in self.request:
for interface in self.getIntrospector().getDirectlyProvidedNames():
if "rem_%s" % interface in self.request:
ob = self.context
interface = getInterface(ob, interface)
- directlyProvides(ob, directlyProvidedBy(ob)-interface)
+ directlyProvides(removeAllProxies(ob), directlyProvidedBy(ob)-interface)
More information about the Zope3-Checkins
mailing list