Changed order of templates activity page from alphabetical to desc count.

This commit is contained in:
Martyn Inglis
2016-08-23 09:14:21 +01:00
parent 25009f3ac9
commit 4dec7a7939
2 changed files with 22 additions and 21 deletions

View File

@@ -101,7 +101,8 @@ def weekly(service_id):
def aggregate_usage(template_statistics):
return sorted(
template_statistics,
key=lambda template_statistic: template_statistic['template_name']
key=lambda template_statistic: template_statistic['count'],
reverse=True
)