'Returns true if this template includes template \'t\' (via {% include %})'

def includes_template(self, t):

    for r in t.relative_filenames:
        if re.search((('\\{%\\s*include\\s+(\\\'|")' + re.escape(r)) + '(\\1)\\s*%\\}'), self.content):
            return True
    return False
