Fix of iss11

This commit is contained in:
2016-10-06 11:20:49 +02:00
parent 26833e389a
commit b44d31d128
2 changed files with 33 additions and 34 deletions

View File

@@ -12,7 +12,6 @@
{% block body %}
<div id="content-main">
<div class="row">
</div>
<div class="col-md-7">
<h2>Neueste Nachrichten</h2>
<p class="text-right">
@@ -52,7 +51,7 @@
<th>Anstoß</th>
<th>Heim</th>
<th>Gast</th>
<th>Erg.></th>
<th>Erg.</th>
<th colspan="2">Tipp</th>
</tr>
{% for match in matches %}
@@ -88,8 +87,9 @@
</div>
</div>
<div class="row">
{% for mandant, list in mandant_dict.items %}
<div class="col-md-7">
<h2>Mitspieler</h2>
<h4>Mitspieler {{ mandant }}</h4>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tr>
@@ -111,7 +111,6 @@
</th>
{% endfor %}
</tr>
{% for mandant, list in mandant_dict.items %}
{% for mate in list %}
<tr>
<td>{{ mate.mate.first_name }}</td>
@@ -121,10 +120,10 @@
{% endfor %}
{% endfor %}
</tr>
{% endfor %}
</table>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@@ -320,11 +320,11 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
mandant_dict = {}
for m in mandants:
mandant = Mandant.objects.get(id=m)
mandant_dict[mandant.name] = []
mandant_dict[mandant.description] = []
rs = RelUserMandant.objects.filter(mandant=m)
for r in rs:
mandant_dict[mandant.name].append({
mandant_dict[mandant.description].append({
'mate': r.user,
'tipps': [],
'sum_score': 0