Thank you, Christophe!

I write code according to your FAQ, but an error occurs.
My code is:

class NewFolderIndex(BrowserPage):
 #adapts(IFolder, IMyLayer)
 #__call__ = ViewPageTemplateFile('skin/')
 def __call__(self):
  self.request.response.setHeader('Content-Type', 'text/plain')

def RegisterLocalPage(event):
    db, conn, root, root_folder = getInformationFromEvent(event)
    for city in root_folder:
        sm = root_folder[city].getSiteManager()
        sm.registerAdapter(NewFolderIndex, [IFolder, IMyLayer], IBrowserPage, 

Zope starts up without any issue. But when I access the 'index.html', an error 

Traceback (most recent call last):
  File "D:\wp\Python24\Lib\site-packages\zope\publisher\", line 130, i
n publish
    obj = request.traverse(obj)
  File "D:\wp\Python24\Lib\site-packages\zope\publisher\", line 527, i
n traverse
    ob, add_steps = publication.getDefaultTraversal(self, ob)
  File "D:\wp\Python24\Lib\site-packages\zope\app\publication\", line
66, in getDefaultTraversal
    return ob.browserDefault(request)
ForbiddenAttribute: ('browserDefault', <mailnice.reglocalpage.NewFolderIndex obj
ect at 0x027F8BF0>)

I dont know why. It seems the inherited BrowserPage.browserDefault is available.

Thank you!
R Nixon 

Zope3-users mailing list

Reply via email to