def __getitem__(self, name): resource = self.context.get(name) if resource is None: raise KeyError(name) if IBannerPlace.providedBy(resource): return Banners(self, resource, self.request) else: return BannerWrapper(resource, self.request)
def browserDefault(self, request): if IBannerPlace.providedBy(self.context): return getattr( BannerWrapper(self.select(), self.request), request.method), () return empty, ()