[Zope-CMF] index_html acquisition
David Hart
dhart@atlantisblue.com.au
Wed, 14 May 2003 14:29:54 +1000
Chris Withers wrote:
> David Hart wrote:
>
>> I've discovered PortalContent is setting index_html = None.
>>
>> Is there any way this variable can be 'unset' to re-enable
>> acquisition of index_html?
>
> in your class do:
>
> index_html = Acquisition.Acquired
>
> ...make sure you import the Acquisition module somewhere too ;-)
Thanks for the tip! This sure looks like it should work, but it doesn't
(when in __init__)
Last week, I had this in __init__:
def __init__( self, id, title='', description='' ):
"""Initialize"""
if hasattr(self, 'index_html'):
del(self.index_html)
Which worked fine. Upon coming back to testing this week, a page render
throws this error:
Module Products.AtlantisBlueProduct.TestObject, line 105, in __init__
KeyError: index_html (Also, an error occurred while attempting to render
the standard error message.)
Isn't that strange??
-dave