def render(self, *a, **kw): """Overrides default Templated.render with two additions * support for rendering API requests with proper wrapping * support for space compression of the result In adition, unlike Templated.render, the result is in the form of a pylons Response object with it's content set. """ if c.bare_content: res = self.content().render() else: res = Templated.render(self, *a, **kw) return responsive(res, self.space_compress)