8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-09 03:16:25 +00:00

Merge branch 'python2_templatetag' into 'dev'

templatetags python2 complient

See merge request federez/re2o!248
This commit is contained in:
chirac 2018-08-12 18:22:54 +02:00
commit 433a85f6c8

View file

@ -227,7 +227,9 @@ def acl_history_filter(parser, token):
def acl_app_filter(parser, token): def acl_app_filter(parser, token):
"""Templatetag for acl checking on applications.""" """Templatetag for acl checking on applications."""
try: try:
tag_name, *app_name = token.split_contents() contents = token.split_contents()
tag_name = contents[0]
app_name = contents[1:]
except ValueError: except ValueError:
raise template.TemplateSyntaxError( raise template.TemplateSyntaxError(
"%r tag require 1 argument: an application" "%r tag require 1 argument: an application"