From c02f137c0bc672a0b12350cfcf5b3b3507abc2da Mon Sep 17 00:00:00 2001 From: Martin Bley Date: Fri, 10 Jun 2016 17:54:59 +0200 Subject: [PATCH] fixed some issues regarding template --- templates/md.html | 2 +- tipp/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/md.html b/templates/md.html index df5ce9d..370b4e7 100644 --- a/templates/md.html +++ b/templates/md.html @@ -137,7 +137,7 @@ {% for mate in tipp_mates %} - {{ mate.mate }} + {{ mate.mate.first_name }} {{ mate.sum_score }} {% for tipp in mate.tipps %} {{ tipp }} diff --git a/tipp/views.py b/tipp/views.py index 58e50a8..797a8b3 100644 --- a/tipp/views.py +++ b/tipp/views.py @@ -286,12 +286,12 @@ def matchday(request, ls, season, matchday, template_name='md.html'): """filter duplicates """ d = False for item in tipp_mates: - if r.user.first_name == item['mate']: + if r.user == item['mate']: d = True if d is False: tipp_mates.append({ - 'mate': r.user.first_name, + 'mate': r.user, 'tipps': [], 'sum_score': 0 })