Sorted mate table

This commit is contained in:
2016-10-06 21:04:19 +02:00
parent 929b540753
commit 72be0aebdb
2 changed files with 25 additions and 0 deletions

View File

@@ -430,6 +430,11 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
mate['tipps'].append(u'\u2714')
except Exception as e:
mate['tipps'].append(u'\u2717')
""" sort items in mandant_dict by score """
mandant_dict[mandant] = sorted(mandant_dict[mandant],
key=lambda k: k['sum_score'], reverse=True)
matches.append(item)