Private
Public Access
1
0

small improvements

This commit is contained in:
Sander Roosendaal
2022-06-25 14:16:17 +02:00
parent 13925f6e7f
commit 0b88f3c861
5 changed files with 50 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
<tr>
<th>Rank</th>
<th>Score</th>
<th>Name</th><td></td>
<th>Name</th><th>&nbsp;</th>
<th>Club</th>
<th>Gender</th>
</tr>
@@ -23,10 +23,25 @@
</table>
</p>
<p>
This page is an experimental ranking based on public race results, mainly from Dutch Masters
rowing events. If your name shows up and you do not agree with that, contact us at info@rowsandall.com
This page is an experimental ranking based on public race results,
mainly from Dutch Masters
rowing events. It is inspired by <a href="https://rowingstats.com/">Rowing Stats</a>.
</p>
<p>
The best way to climb the ranking is to win races against crews with people who are higher
in the ranking (unexpected win).
</p>
<p>
If your name shows up and you do not agree with that, contact us at info@rowsandall.com
and we'll remove your name.
</p>
<p>
If you'd like us to include a recent race result, use the "Add Race" link below. A race
is a single start (during a regatta).
</p>
<p>
You can also contact us at info@rowsandall.com.
</p>
<p>
This ranking was based on results from following races:
</p>

View File

@@ -0,0 +1,19 @@
<h1>
{{ crew.name }}
</h1>
<p>
<table>
<tr>
<th>Athlete</th>
<th>&nbsp;</th>
<th>Score</th>
</tr>
{% for athlete in athletes %}
<tr>
<td>{{ athlete.first_name }}</td>
<td>{{ athlete.last_name }}</td>
<td>{{ athlete.trueskill_exposed|floatformat:2 }}</td>
</tr>
{% endfor %}
</table>
</p>

View File

@@ -13,7 +13,7 @@
{% for result in results %}
<tr>
<td>{{ result.order }}</td>
<td>{{ result.crew.name }}</td>
<td><a href="/boatmovers/crew/{{ result.crew.id }}/">{{ result.crew.name }}</a></td>
</tr>
{% endfor %}
</table>

View File

@@ -12,5 +12,6 @@ urlpatterns = [
url(r'race/(?P<id>\d+)/$',views.race_view,name='race_view'),
url(r'race/(?P<id>\d+)/verify/$',views.race_verify,name='race_verify'),
url(r'race/(?P<id>\d+)/process/$',views.race_process,name='race_process'),
url(r'crew/(?P<id>\d+)/$',views.crew_view,name='crew_view'),
url(r'^$',views.boatmovers_view,name='boatmovers')
]

View File

@@ -83,3 +83,14 @@ def race_process(request, id=0):
outcome = race.process()
return HttpResponseRedirect(reverse('race_view',kwargs={'id':race.id}))
def crew_view(request, id=0):
crew = get_object_or_404(Crew, pk=id)
athletes = crew.athletes.all().order_by("-trueskill_exposed")
return render(request,
'crew.html',
{
'crew':crew,
'athletes':athletes
})