Created
August 10, 2018 13:09
-
-
Save chapkovski/5c7c34667882c3a159cfdc0aa515a4a2 to your computer and use it in GitHub Desktop.
copypaste from django extends tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@register.tag('extends') | |
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