Fix list order

This commit is contained in:
Kevin Alberts 2019-11-12 13:45:46 +01:00
parent 0c864a5ce4
commit 504a9f6515
Signed by: Kurocon
GPG key ID: BCD496FEBA0C6BC1

View file

@ -26,7 +26,7 @@ class HomePage(CreateView):
def get_context_data(self, **kwargs):
context = super(HomePage, self).get_context_data(**kwargs)
context['tappers'] = list(Tapper.objects.all().annotate(amount=Count('kwijtgeraakt')))
context['tappers'] = list(Tapper.objects.all().annotate(amount=Count('kwijtgeraakt')).order_by('-amount'))
context['detailform'] = DetailForm()