Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
copypaste from django extends tag
def do_extends(parser, token):
nodelist = parser.parse()
if nodelist.get_nodes_by_type(ExtendsNode):
raise TemplateSyntaxError("'%s' cannot appear more than once in the same template" % bits[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment