From 966a4a611a6d75bedb226ea4ca0ed3d56399eb92 Mon Sep 17 00:00:00 2001 From: Raffaele Salmaso Date: Sat, 20 Jan 2018 09:38:42 +0100 Subject: [PATCH] Use simple_tag as assigned_tag is removed --- src/wiki/plugins/macros/templatetags/wiki_macro_tags.py | 2 +- src/wiki/templatetags/wiki_tags.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wiki/plugins/macros/templatetags/wiki_macro_tags.py b/src/wiki/plugins/macros/templatetags/wiki_macro_tags.py index b5e8c847..e4f611cd 100644 --- a/src/wiki/plugins/macros/templatetags/wiki_macro_tags.py +++ b/src/wiki/plugins/macros/templatetags/wiki_macro_tags.py @@ -15,7 +15,7 @@ def article_list(context, urlpath, depth): return context -@register.assignment_tag +@register.simple_tag def allowed_macros(): for method in settings.METHODS: try: diff --git a/src/wiki/templatetags/wiki_tags.py b/src/wiki/templatetags/wiki_tags.py index 917276d9..0d9f9954 100644 --- a/src/wiki/templatetags/wiki_tags.py +++ b/src/wiki/templatetags/wiki_tags.py @@ -22,7 +22,7 @@ register = template.Library() _cache = {} -@register.assignment_tag(takes_context=True) +@register.simple_tag(takes_context=True) def article_for_object(context, obj): if not isinstance(obj, Model): raise TypeError( @@ -186,7 +186,7 @@ def is_locked(model): return (model.current_revision and model.current_revision.locked) -@register.assignment_tag(takes_context=True) +@register.simple_tag(takes_context=True) def login_url(context): request = context['request'] qs = request.META.get('QUERY_STRING', '') -- 2.45.2