'Forces the rendering of the response\'s template, sets the result
as response body and unsets :attr:`.template`'

def flatten(self):

    if self.template:
        self.response.append(self.render())
        self.template = None
