def find_parents(name, parents=None):
    """
    Recursively find all of this template's parents and return them as a list.
    """
    template = loader.get_template(name)
    source, origin = find_template_source(name)
    if parents is None:
        parents = []
    else:
        parents.append({'name': name, 'file': origin})
    for node in template:
        if isinstance(node, ExtendsNode):
            parent_name = node.parent_name.token.strip('"')
            return find_parents(parent_name, parents)
    return parents
Recursively find all of this template's parents and return them as a list.