diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-17 18:27:49 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-17 18:27:49 +0200 |
commit | faacee0a659f5eb1d8d3cd08f49b37e48c5c9a55 (patch) | |
tree | fdc06aea66ce34492024a6c3f23c66489899fccf | |
parent | da0eea9e21a4d48bc56bf3a9a147d306671903c8 (diff) | |
download | Chimère-faacee0a659f5eb1d8d3cd08f49b37e48c5c9a55.tar.bz2 Chimère-faacee0a659f5eb1d8d3cd08f49b37e48c5c9a55.zip |
Fix unescape template
-rw-r--r-- | chimere/templatetags/unescape.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chimere/templatetags/unescape.py b/chimere/templatetags/unescape.py index a919e77..45ce0d5 100644 --- a/chimere/templatetags/unescape.py +++ b/chimere/templatetags/unescape.py @@ -20,10 +20,10 @@ def raw(parser, token): text = [] parse_until = 'endraw' tag_mapping = { - template.TOKEN_TEXT: ('', ''), - template.TOKEN_VAR: ('{{', '}}'), - template.TOKEN_BLOCK: ('{%', '%}'), - template.TOKEN_COMMENT: ('{#', '#}'), + template.base.TOKEN_TEXT: ('', ''), + template.base.TOKEN_VAR: ('{{', '}}'), + template.base.TOKEN_BLOCK: ('{%', '%}'), + template.base.TOKEN_COMMENT: ('{#', '#}'), } # By the time this template tag is called, the template system has already # lexed the template into tokens. Here, we loop over the tokens until @@ -32,9 +32,9 @@ def raw(parser, token): # stripped off in a previous part of the template-parsing process. while parser.tokens: token = parser.next_token() - if token.token_type == template.TOKEN_BLOCK and \ + if token.token_type == template.base.TOKEN_BLOCK and \ token.contents == parse_until: - return template.TextNode(u''.join(text)) + return template.base.TextNode(u''.join(text)) start, end = tag_mapping[token.token_type] text.append(u'%s%s%s' % (start, token.contents, end)) parser.unclosed_block_tag(parse_until) |