##// 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 else:
18 else:
19 domains[domain] = 1
19 domains[domain] = 1
20
20
21 for domain in domains:
21 domain_list = [(item, domains[item]) for item in domains.keys()]
22 print('{}: {}'.format(domain, domains[domain]))
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 print('* Overall numbers')
26 print('* Overall numbers')
25 print('{} attachments in the system, {} of them as URLs'.format(
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