@register.tag
def overextends(parser, token):
 if (DJANGO_VERSION >= (1, 9)):
  warnings.warn(u"The `overextends` template tag is deprecated in favour of Django's built-in `extends` tag, which supports recursive extension in Django 1.9 and above.", DeprecationWarning, stacklevel=2)
 bits = token.split_contents()
 if (len(bits) != 2):
  raise TemplateSyntaxError((u"'%s' takes one argument" % bits[0]))
 parent_name = parser.compile_filter(bits[1])
 nodelist = parser.parse()
 if nodelist.get_nodes_by_type(ExtendsNode):
  raise TemplateSyntaxError((u"'%s' cannot appear more than once in the same template" % bits[0]))
 return OverExtendsNode(nodelist, parent_name, None)

@ register . tag def overextends ( parser , token ) : if ( DJANGO_VERSION >= ( 1 , 9 ) ) : warnings . warn ( u"The `overextends` template tag is deprecated in favour of Django's built-in `extends` tag, which supports recursive extension in Django 1.9 and above." , DeprecationWarning , stacklevel = 2 ) bits = token . split_contents ( ) if ( len ( bits ) != 2 ) : raise TemplateSyntaxError ( ( u"'%s' takes one argument" % bits [ 0 ] ) ) parent_name = parser . compile_filter ( bits [ 1 ] ) nodelist = parser . parse ( ) if nodelist . get_nodes_by_type ( ExtendsNode ) : raise TemplateSyntaxError ( ( u"'%s' cannot appear more than once in the same template" % bits [ 0 ] ) ) return OverExtendsNode ( nodelist , parent_name , None )
extended version of djangos extends tag that allows circular inheritance to occur .