modified for EURO 2016

This commit is contained in:
2016-06-10 17:36:02 +02:00
parent 4b2f7e4641
commit 538f6262fd
3 changed files with 41 additions and 9 deletions

View File

@@ -283,11 +283,18 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
for m in mandants:
rs = RelUserMandant.objects.filter(mandant=m)
for r in rs:
tipp_mates.append({
'mate': r.user,
'tipps': [],
'sum_score': 0
})
"""filter duplicates """
d = False
for item in tipp_mates:
if r.user.first_name == item['mate']:
d = True
if d is False:
tipp_mates.append({
'mate': r.user.first_name,
'tipps': [],
'sum_score': 0
})
matches = []
for match in md_matches:
@@ -393,7 +400,7 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
posts.append( (post, avatar) )
return render(request, 'md.html', {
#'debug': debug,
'debug': debug,
#'mds_season': mds_in_season,
'cur_md': matchday,
'matches': matches,