adding course length to info
This commit is contained in:
@@ -1 +0,0 @@
|
||||
e408191@CZ27LT9RCGN72.63076:1525965015
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user