Revert adding request to adapted objects.
This commit is contained in:
parent
b6a0621283
commit
5f072547b1
3 changed files with 3 additions and 6 deletions
|
@ -312,7 +312,7 @@ class BaseView(GenericView, I18NView):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def adapted(self):
|
def adapted(self):
|
||||||
return adapted(self.context, self.languageInfo, self.request)
|
return adapted(self.context, self.languageInfo)
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def baseObject(self):
|
def baseObject(self):
|
||||||
|
|
|
@ -43,11 +43,10 @@ from loops import util
|
||||||
|
|
||||||
# convenience functions
|
# convenience functions
|
||||||
|
|
||||||
def adapted(obj, langInfo=None, request=None):
|
def adapted(obj, langInfo=None):
|
||||||
""" Return adapter based on the object type's type interface.
|
""" Return adapter based on the object type's type interface.
|
||||||
"""
|
"""
|
||||||
if isinstance(obj, AdapterBase):
|
if isinstance(obj, AdapterBase):
|
||||||
obj.request = request
|
|
||||||
return obj
|
return obj
|
||||||
t = IType(obj, None)
|
t = IType(obj, None)
|
||||||
if t is not None:
|
if t is not None:
|
||||||
|
@ -58,7 +57,6 @@ def adapted(obj, langInfo=None, request=None):
|
||||||
if isinstance(adapted, I18NAdapterBase):
|
if isinstance(adapted, I18NAdapterBase):
|
||||||
adapted.languageInfo = langInfo
|
adapted.languageInfo = langInfo
|
||||||
if adapted is not None:
|
if adapted is not None:
|
||||||
adapted.request = request
|
|
||||||
return adapted
|
return adapted
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
@ -100,7 +98,7 @@ class AdapterBase(object):
|
||||||
|
|
||||||
adapts(IConcept)
|
adapts(IConcept)
|
||||||
|
|
||||||
_adapterAttributes = ('context', '__parent__', 'request')
|
_adapterAttributes = ('context', '__parent__')
|
||||||
_contextAttributes = list(IConcept)
|
_contextAttributes = list(IConcept)
|
||||||
_noexportAttributes = ()
|
_noexportAttributes = ()
|
||||||
_textIndexAttributes = ()
|
_textIndexAttributes = ()
|
||||||
|
|
|
@ -200,7 +200,6 @@ class ILoopsAdapter(IConceptSchema):
|
||||||
|
|
||||||
context = Attribute('The underlying persistent object.')
|
context = Attribute('The underlying persistent object.')
|
||||||
uid = Attribute('Unique id of the context object.')
|
uid = Attribute('Unique id of the context object.')
|
||||||
request = Attribute('A a mapping with current settings, optional.')
|
|
||||||
|
|
||||||
def getChildren():
|
def getChildren():
|
||||||
""" Return a collection of child objects provided by the context
|
""" Return a collection of child objects provided by the context
|
||||||
|
|
Loading…
Add table
Reference in a new issue