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

View File

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