def get_placeholders(template_name):
    """Return a list of PlaceholderNode found in the given template.

    :param template_name: the name of the template file
    """
    dummy_context.template = template.Template("")
    try:
        temp_wrapper = template.loader.get_template(template_name)
    except template.TemplateDoesNotExist:
        return []

    plist, blist = [], []
    temp = temp_wrapper.template
    _placeholders_recursif(temp.nodelist, plist, blist)

    previous = {}
    block_to_remove = []
    for block in blist:
        if previous in block.name:
            if not hasattr(block, 'has_super_var'):
                block_to_remove.append(previous[block.name])
        previous[block.name] = block

    def keep(p):
        return not p.found_in_block in block_to_remove

    placeholders = [p for p in plist if keep(p)]
    names = []
    pfiltered = []
    for p in placeholders:
        if p.ctype not in names:
            pfiltered.append(p)
            names.append(p.ctype)

    return pfiltered
dataset/ETHPy150Open batiste/django-page-cms/pages/utils.py/get_placeholders/swapped operands of `in`