

def do_extends(parser, token):
    '\n    Signal that this template extends a parent template.\n\n    This tag may be used in two ways: ``{% extends "base" %}`` (with quotes)\n    uses the literal value "base" as the name of the parent template to extend,\n    or ``{% extends variable %}`` uses the value of ``variable`` as either the\n    name of the parent template to extend (if it evaluates to a string) or as\n    the parent tempate itelf (if it evaluates to a Template object).\n    '
    bits = token.split_contents()
    if (len(bits) != 2):
        raise TemplateSyntaxError(("'%s' takes one argument" % bits[0]))
    (parent_name, parent_name_expr) = (None, None)
    if ((bits[1][0] in ('"', "'")) and (bits[1][(- 1)] == bits[1][0])):
        parent_name = bits[1][1:(- 1)]
    else:
        parent_name_expr = parser.compile_filter(bits[1])
    nodelist = parser.parse()
    if nodelist.get_nodes_by_type(ExtendsNode):
        raise TemplateSyntaxError(("'%s' cannot appear more than once in the same template" % bits[0]))
    return ExtendsNode(nodelist, bits, parent_name_expr)

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/_internal/django/template/loader_tags.py do_extends/VarMisuse@172/418 `parent_name`->`bits`