From 3d70539af04f6b2fb131b0e8e40b825c31b26e25 Mon Sep 17 00:00:00 2001 From: Suneel Chakravorty Date: Tue, 8 May 2012 20:05:55 -0400 Subject: [PATCH] small changes --- game/models.py | 2 +- game/views.py | 2 +- templates/account/dashboard.html | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/game/models.py b/game/models.py index a597f4b..b04200d 100644 --- a/game/models.py +++ b/game/models.py @@ -47,7 +47,7 @@ def save(self): @property def win_loss_ratio(self): - return self.win_count / float(self.loss_count) + return "{} wins, {} losses".format(self.win_count, self.loss_count) @property def win_count(self): diff --git a/game/views.py b/game/views.py index a726028..62fbbe6 100644 --- a/game/views.py +++ b/game/views.py @@ -20,7 +20,7 @@ class AddGameView(TemplateView): def get(self, request, *args, **kwargs): self.opponent = Account.objects.get(handle=request.GET.get('opponent')) - self.form = self.form_class({'player_2': self.opponent, 'score_1': 21}) + self.form = self.form_class({'player_2': self.opponent, 'score_2': 21}) return self.render_to_response(self.compute_context(request, *args, **kwargs)) def post(self, request, *args, **kwargs): diff --git a/templates/account/dashboard.html b/templates/account/dashboard.html index 6dcb757..137fed9 100644 --- a/templates/account/dashboard.html +++ b/templates/account/dashboard.html @@ -36,8 +36,8 @@

{{day.grouper}} ({{ day.list|length }} games played)

- -
Add a game faster! Just click your opponent's name below.
+ +
Add a game faster! Just click the winner's name below.
@@ -53,7 +53,7 @@

{{day.grouper}} ({{ day.list|length }} games played)

{% if player.games_played != 0 %} - +
{{player.rank}}{{player.handle}}{{player.handle}} {{player.pretty_rating}} {{player.games_played}} {{player.win_loss_ratio}}