def render_all(self, results, template, url, kw='items', canonical_for=None, canonical_title=None): results = cache(results) # only called `template` in args for API reasons template_name = template template = self.env.get_template(template_name) item = self.item_withbundles({kw: results}) final_url = self.env.from_string(url).render(item) canonical = None if canonical_for is not None: canonical_for = self.env.from_string(canonical_for).render(item) canonical_title = self.maybe_render(self.maybe_template(canonical_title), item) canonical = (canonical_for, canonical_title) self.render_actions.append(( final_url, canonical, template.render(item))) return results