Commit 0333ad56 by Timothée Peignier

use new syntax in templatetag too

parent 0abc5bf8
......@@ -94,19 +94,19 @@ class CompressedJSNode(template.Node):
return '\n'.join(tags)
@register.tag
def compressed_css(parser, token):
try:
tag_name, name = token.split_contents()
except ValueError:
raise template.TemplateSyntaxError('%r requires exactly one argument: the name of a group in the PIPELINE_CSS setting' % token.split_contents()[0])
return CompressedCSSNode(name)
compressed_css = register.tag(compressed_css)
@register.tag
def compressed_js(parser, token):
try:
tag_name, name = token.split_contents()
except ValueError:
raise template.TemplateSyntaxError('%r requires exactly one argument: the name of a group in the PIPELINE_JS setting' % token.split_contents()[0])
return CompressedJSNode(name)
compressed_js = register.tag(compressed_js)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment