def __call__(self, context, request): renderings = [] for viewname in self.viewnames: try: iterable = render_view_to_iterable(context, request, viewname) except Forbidden: continue if iterable is None: raise ValueError( 'No such view named %s for viewgroup %s' % (viewname, self.name) ) renderings.append(iterable) return Response(app_iter=itertools.chain(*renderings))
def _callFUT(self, *arg, **kw): from pyramid.view import render_view_to_iterable return render_view_to_iterable(*arg, **kw)