fixed some issues regarding template
This commit is contained in:
@@ -137,7 +137,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% for mate in tipp_mates %}
|
{% for mate in tipp_mates %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ mate.mate }}</td>
|
<td>{{ mate.mate.first_name }}</td>
|
||||||
<td>{{ mate.sum_score }}</td>
|
<td>{{ mate.sum_score }}</td>
|
||||||
{% for tipp in mate.tipps %}
|
{% for tipp in mate.tipps %}
|
||||||
<td>{{ tipp }}</td>
|
<td>{{ tipp }}</td>
|
||||||
|
|||||||
@@ -286,12 +286,12 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
|
|||||||
"""filter duplicates """
|
"""filter duplicates """
|
||||||
d = False
|
d = False
|
||||||
for item in tipp_mates:
|
for item in tipp_mates:
|
||||||
if r.user.first_name == item['mate']:
|
if r.user == item['mate']:
|
||||||
d = True
|
d = True
|
||||||
|
|
||||||
if d is False:
|
if d is False:
|
||||||
tipp_mates.append({
|
tipp_mates.append({
|
||||||
'mate': r.user.first_name,
|
'mate': r.user,
|
||||||
'tipps': [],
|
'tipps': [],
|
||||||
'sum_score': 0
|
'sum_score': 0
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user