sort the items

main
eric 2023-05-09 16:07:53 -04:00
parent 4356f02b5e
commit 5283cab505
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ class ProblemPublishersView(generic.TemplateView):
for link in problinks: for link in problinks:
pub = link.items.filter(status=1).first().publisher_name pub = link.items.filter(status=1).first().publisher_name
probpubs[pub] = probpubs.get(pub, 0) + 1 probpubs[pub] = probpubs.get(pub, 0) + 1
return {'pubs': probpubs.items() } return {'pubs': sorted(probpubs.items(), key=lambda x: x[0]) }
class PublisherView(generic.TemplateView): class PublisherView(generic.TemplateView):