From 33091ff2f6ecfa42dacccbe16cad5da009c472a2 Mon Sep 17 00:00:00 2001 From: olaf michaelis Date: Mon, 4 May 2020 13:46:48 +0200 Subject: [PATCH] Remove ununsed tags --- rdmo/views/templatetags/view_tags.py | 32 ---------------------------- 1 file changed, 32 deletions(-) diff --git a/rdmo/views/templatetags/view_tags.py b/rdmo/views/templatetags/view_tags.py index 2b8f6e6cb1..0c865b5145 100644 --- a/rdmo/views/templatetags/view_tags.py +++ b/rdmo/views/templatetags/view_tags.py @@ -38,50 +38,18 @@ def get_values(context, attribute_path, set_index='*', index='*'): return '' -@register.simple_tag(takes_context=True) -def get_numbers(context, attribute_path, set_index='*', index='*'): - numbers = [] - for value_set in get_values(context, attribute_path, set_index, index): - numbers.append([value.as_number for value in value_set]) - return numbers - - @register.simple_tag(takes_context=True) def get_set_values(context, set, attribute_path, index='*'): return get_values(context, attribute_path, set.set_index, index) - -@register.simple_tag(takes_context=True) -def get_set_numbers(context, set, attribute_path, index='*'): - return get_numbers(context, attribute_path, set.set_index, index) - - -@register.simple_tag(takes_context=True) -def get_set_sum(context, set, attribute_path, index='*'): - numbers = get_set_numbers(context, set, attribute_path, index) - return sum(numbers) - - @register.simple_tag(takes_context=True) def get_value(context, attribute_path, set_index=0, index=0): return get_values(context, attribute_path, set_index, index) - -@register.simple_tag(takes_context=True) -def get_number(context, attribute_path, set_index=0, index=0): - return get_numbers(context, attribute_path, set_index, index) - - @register.simple_tag(takes_context=True) def get_set_value(context, set, attribute_path, index=0): return get_set_values(context, set, attribute_path, index) - -@register.simple_tag(takes_context=True) -def get_set_number(context, set, attribute_path, index=0): - return get_set_numbers(context, set, attribute_path, index) - - @register.simple_tag(takes_context=True) def get_set(context, attribute_path): id_path = attribute_path.rstrip('/') + '/id'