From 24a4069aab99969508d4c8fdeef58476a6d6b565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Sat, 2 Dec 2017 00:03:19 +0000 Subject: [PATCH] Add support for args passed through the templatetag to the acl function --- re2o/templatetags/acl.py | 47 +++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/re2o/templatetags/acl.py b/re2o/templatetags/acl.py index 6cb5e4d4..663adfd1 100644 --- a/re2o/templatetags/acl.py +++ b/re2o/templatetags/acl.py @@ -26,9 +26,11 @@ Set of templatags for using acl in templates: **Parameters**: model_name - The model_name that needs to be checked for the current user + args - Any other argument that is interpreted as a python object and passed + to the acl function (can_xxx) **Usage**: - {% model %} + {% model [arg1 [arg2 [...]]]%}