Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
suneel0101 committed May 9, 2012
1 parent d8ed57e commit 3d70539
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion game/models.py
Expand Up @@ -47,7 +47,7 @@ def save(self):


@property @property
def win_loss_ratio(self): def win_loss_ratio(self):
return self.win_count / float(self.loss_count) return "{} wins, {} losses".format(self.win_count, self.loss_count)


@property @property
def win_count(self): def win_count(self):
Expand Down
2 changes: 1 addition & 1 deletion game/views.py
Expand Up @@ -20,7 +20,7 @@ class AddGameView(TemplateView):


def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
self.opponent = Account.objects.get(handle=request.GET.get('opponent')) 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)) return self.render_to_response(self.compute_context(request, *args, **kwargs))


def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
Expand Down
6 changes: 3 additions & 3 deletions templates/account/dashboard.html
Expand Up @@ -36,8 +36,8 @@ <h4> {{day.grouper}} ({{ day.list|length }} games played)</h4>
</div> </div>


<div class="span6"> <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="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 your opponent's name below.</div> <div style="text-align:center; padding-bottom:5px;">Add a game faster! Just click the winner's name below.</div>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
Expand All @@ -53,7 +53,7 @@ <h4> {{day.grouper}} ({{ day.list|length }} games played)</h4>
{% if player.games_played != 0 %} {% if player.games_played != 0 %}
<tr> <tr>
<td>{{player.rank}}</td> <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.pretty_rating}}</td>
<td>{{player.games_played}}</td> <td>{{player.games_played}}</td>
<td>{{player.win_loss_ratio}}</td> <td>{{player.win_loss_ratio}}</td>
Expand Down

0 comments on commit 3d70539

Please sign in to comment.