[Zope] index.html in Python Script?

David H bluepaul at earthlink.net
Thu Apr 21 20:32:42 EDT 2005


Erik Myllymaki wrote:

> How do address a ZPT with a name like index.html in a Python Script?
>
> The following:
>
> request = container.REQUEST
> RESPONSE =  request.RESPONSE
>
> if not request.has_key('next_state'):
>   return container.index.html(context, request)
>
> returns:
>
> Error Type: AttributeError
> Error Value: index
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
Erik,
I think its failing at the DOT between index and html. 
Try something like:

return container['index.html'](context,request)

David


More information about the Zope mailing list