Revert adding request to adapted objects.

This commit is contained in:
Helmut Merz 2011-04-30 09:24:45 +02:00
parent b6a0621283
commit 5f072547b1
3 changed files with 3 additions and 6 deletions

View file

@ -312,7 +312,7 @@ class BaseView(GenericView, I18NView):
@Lazy
def adapted(self):
return adapted(self.context, self.languageInfo, self.request)
return adapted(self.context, self.languageInfo)
@Lazy
def baseObject(self):

View file

@ -43,11 +43,10 @@ from loops import util
# convenience functions
def adapted(obj, langInfo=None, request=None):
def adapted(obj, langInfo=None):
""" Return adapter based on the object type's type interface.
"""
if isinstance(obj, AdapterBase):
obj.request = request
return obj
t = IType(obj, None)
if t is not None:
@ -58,7 +57,6 @@ def adapted(obj, langInfo=None, request=None):
if isinstance(adapted, I18NAdapterBase):
adapted.languageInfo = langInfo
if adapted is not None:
adapted.request = request
return adapted
return obj
@ -100,7 +98,7 @@ class AdapterBase(object):
adapts(IConcept)
_adapterAttributes = ('context', '__parent__', 'request')
_adapterAttributes = ('context', '__parent__')
_contextAttributes = list(IConcept)
_noexportAttributes = ()
_textIndexAttributes = ()

View file

@ -200,7 +200,6 @@ class ILoopsAdapter(IConceptSchema):
context = Attribute('The underlying persistent object.')
uid = Attribute('Unique id of the context object.')
request = Attribute('A a mapping with current settings, optional.')
def getChildren():
""" Return a collection of child objects provided by the context