'The general output method, override in subclass if you need to do
any custom modification. Calls other mode specific methods or simply
returns the content directly.'

def output(self, mode=u'file', forced=False):

    output = u'\n'.join(self.filter_input(forced))
    if (not output):
        return u''
    if (settings.COMPRESS_ENABLED or forced):
        filtered_output = self.filter_output(output)
        return self.handle_output(mode, filtered_output, forced)
    return output
