Private
Public Access
1
0

adding course length to info

This commit is contained in:
Sander Roosendaal
2018-05-14 13:01:26 +02:00
parent 3502abc118
commit 7434a242aa
3 changed files with 9 additions and 2 deletions

View File

@@ -1 +0,0 @@
e408191@CZ27LT9RCGN72.63076:1525965015

View File

@@ -28,6 +28,7 @@
<tr> <tr>
<th> Country</th> <th> Country</th>
<th> Name</th> <th> Name</th>
<th> Distance</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -41,6 +42,9 @@
<a href="/rowers/courses/{{ course.id }}">{{ course.name }}</a> <a href="/rowers/courses/{{ course.id }}">{{ course.name }}</a>
{% endif %} {% endif %}
</td> </td>
<td>
{{ course|courselength }} m
</td>
</tr> </tr>

View File

@@ -7,6 +7,7 @@ import json
import datetime import datetime
register = template.Library() register = template.Library()
from rowers.utils import calculate_age from rowers.utils import calculate_age
from rowers.models import course_length
from rowers.plannedsessions import ( from rowers.plannedsessions import (
race_can_register, race_can_submit,race_rower_status race_can_register, race_can_submit,race_rower_status
) )
@@ -75,6 +76,9 @@ def deltatimeprint(d):
else: else:
return strfdeltah(d) return strfdeltah(d)
@register.filter
def courselength(course):
return course_length(course)
@register.filter(is_safe=True) @register.filter(is_safe=True)
def jsdict(dict,key): def jsdict(dict,key):