[Zope] index_html always seems to exist

Dennis Allison allison@sumeru.stanford.EDU
Fri, 23 May 2003 17:53:24 -0700 (PDT)


Read the Zope Book on acquisition and the special properties of
index_html.   Strange as the behavior may seem, you will come to love it.

On Sat, 24 May 2003, martin f krafft wrote:

> i have a python script doing the following:
> 
>   file = 'index_html'
>   if not hasattr(context.aq_explicit, file):
>     context.invokeFactory('Member Profile', id=file, title=file)
> 
> in English:
>   if the current folder does not have an object by the name of
>   'index_html', then generate a new 'Member Profile'.
> 
> This works beautifully whenever file is set to something that's not
> 'index_html'; the file gets added if and only if there isn't one
> yet.
> 
> However, in the case of index_html, it always seems to exist, even
> if there is no index_html in the current folder (and yes, I have
> verified that context is the right folder).
>