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

20
templates/about.html Normal file
View File

@@ -0,0 +1,20 @@
{% extends "base.html" %}
{% load i18n static %}
{% load humanize %}
{% block head %}
<script type="text/javascript" src="{{ STATIC_URL }}javascript/tippy.js"></script>
{% endblock %}
{% block nav %}
{% include "nav.html" with ls=ls season=season %}
{% endblock %}
{% block body %}
<div id="content-main">
<div class="row">
<div class="col-md-7">
<h2>Über TipPy</h2>
</div>
</div>
</div>

View File

@@ -430,6 +430,11 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
mate['tipps'].append(u'\u2714') mate['tipps'].append(u'\u2714')
except Exception as e: except Exception as e:
mate['tipps'].append(u'\u2717') 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) matches.append(item)