diff options
Diffstat (limited to 'reports/brpt')
-rw-r--r-- | reports/brpt/reports/templatetags/django_templating_sigh.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/reports/brpt/reports/templatetags/django_templating_sigh.py b/reports/brpt/reports/templatetags/django_templating_sigh.py index 59fcce204..555ef4e6c 100644 --- a/reports/brpt/reports/templatetags/django_templating_sigh.py +++ b/reports/brpt/reports/templatetags/django_templating_sigh.py @@ -15,10 +15,14 @@ def set_interaction(parser, token): def sortwell(value): "sorts a list(or evaluates queryset to list) of bad, extra, or modified items in the best way for presentation" - return sorted(sorted(list(value),lambda x,y: cmp(x.name, y.name)), lambda x,y: cmp(x.kind, y.kind)) + configItems = list(value) + sort(sort(configItems,lambda x,y: cmp(x.name, y.name)), lambda x,y: cmp(x.kind, y.kind)) + return configItems def sortname(value): "sorts a list( or evaluates queryset) by name" - return sorted(list(value),lambda x,y: cmp(x.name, y.name)) + configItems = list(value) + sort(configItems,lambda x,y: cmp(x.name, y.name)) + return configItems class SetInteraction(template.Node): def __init__(self, times): |