[Zope-CMF] Error with a macros object

Charlie Clark charlie at begeistert.org
Sun Nov 29 09:56:13 EST 2009


Am 24.11.2009, 16:05 Uhr, schrieb Charlie Clark <charlie at begeistert.org>:

> Hi,
> I've just got the following error on a macros page:
> _macros' object has no attribute 'index'

I think I've traced the source of the error. In  
Products.Five.browser.metaconfigure there is the following mixin and the  
key access is understandbly raising the error.

class ViewMixinForTemplates(BrowserView):
     # Cloned from zope.app.pagetemplate.simpleviewclass.simple
     implements(IBrowserPublisher)

     def browserDefault(self, request):
         return self, ()

     def publishTraverse(self, request, name):
         if name == 'index.html':
             return self.index

         raise NotFound(self, name, request)

     def __getitem__(self, name):
         return self.index.macros[name]

     def __call__(self, *args, **kw):
         return self.index(*args, **kw)

Where is the "index" defined? I can't find it in IBrowserView or  
IBrowserPublisher?

Charlie
-- 
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226


More information about the Zope-CMF mailing list