Browse files

small changes

  • Loading branch information...
1 parent d8ed57e commit 3d70539af04f6b2fb131b0e8e40b825c31b26e25 @suneel0101 suneel0101 committed May 8, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 game/models.py
  2. +1 −1 game/views.py
  3. +3 −3 templates/account/dashboard.html
View
2 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):
View
2 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):
View
6 templates/account/dashboard.html
@@ -36,8 +36,8 @@
</div>
<div class="span6">
-<div style="margin-bottom:15px" class="well"><h2> Ranking <a style="float:right; font-size:70%; color:green" target="_blank" href='http://www.usatt.org/ratings/ratingsprocess.html'>How are players ranked?</a> </h2></div>
-<div style="text-align:center; padding-bottom:5px;">Add a game faster! Just click your opponent's name below.</div>
+<div style="margin-bottom:15px" class="well"><h2> Ranking <a style="float:right; font-size:70%" target="_blank" href='http://www.usatt.org/ratings/ratingsprocess.html'>How are players ranked?</a> </h2></div>
+<div style="text-align:center; padding-bottom:5px;">Add a game faster! Just click the winner's name below.</div>
<table class="table">
<thead>
<tr>
@@ -53,7 +53,7 @@
{% if player.games_played != 0 %}
<tr>
<td>{{player.rank}}</td>
-<td><a href='{% url add_game %}?opponent={{player.handle}}'; style="color:green";>{{player.handle}}</td></a>
+<td><a href='{% url add_game %}?opponent={{player.handle}}'>{{player.handle}}</td></a>
<td>{{player.pretty_rating}}</td>
<td>{{player.games_played}}</td>
<td>{{player.win_loss_ratio}}</td>

0 comments on commit 3d70539

Please sign in to comment.