##// END OF EJS Templates
Sort domains by their usage in statistics
neko259 -
r1782:71d3a47e default
parent child Browse files
Show More
@@ -18,8 +18,10 b' class Command(BaseCommand):'
18 18 else:
19 19 domains[domain] = 1
20 20
21 for domain in domains:
22 print('{}: {}'.format(domain, domains[domain]))
21 domain_list = [(item, domains[item]) for item in domains.keys()]
22 domain_list = sorted(domain_list, key=lambda domain: -domain[1])
23 for domain in domain_list:
24 print('{}: {}'.format(domain[0], domain[1]))
23 25
24 26 print('* Overall numbers')
25 27 print('{} attachments in the system, {} of them as URLs'.format(
General Comments 0
You need to be logged in to leave comments. Login now