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