verbose names for boat class
This commit is contained in:
@@ -59,7 +59,7 @@
|
|||||||
<td>{{ standard.name }}</td>
|
<td>{{ standard.name }}</td>
|
||||||
<td>{{ standard.coursedistance }}</td>
|
<td>{{ standard.coursedistance }}</td>
|
||||||
<td>{{ standard.coursetime }}</td>
|
<td>{{ standard.coursetime }}</td>
|
||||||
<td>{{ standard.boatclass }}</td>
|
<td>{{ standard.boatclass|boatclass }}</td>
|
||||||
<td>{{ standard.boattype }}</td>
|
<td>{{ standard.boattype }}</td>
|
||||||
<td>{{ standard.sex|sex }}</td>
|
<td>{{ standard.sex|sex }}</td>
|
||||||
<td>{{ standard.weightclass|weight }}</td>
|
<td>{{ standard.weightclass|weight }}</td>
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ from rowers import c2stuff, runkeeperstuff
|
|||||||
from rowers.c2stuff import c2_open
|
from rowers.c2stuff import c2_open
|
||||||
from rowers.runkeeperstuff import runkeeper_open
|
from rowers.runkeeperstuff import runkeeper_open
|
||||||
from rowers.rower_rules import is_coach_user, is_workout_user, isplanmember,ispromember
|
from rowers.rower_rules import is_coach_user, is_workout_user, isplanmember,ispromember
|
||||||
from rowers.mytypes import otwtypes,adaptivetypes,sexcategories,weightcategories
|
from rowers.mytypes import (
|
||||||
|
otwtypes,adaptivetypes,sexcategories,weightcategories,workouttypes,
|
||||||
|
)
|
||||||
from rowers.utils import NoTokenError
|
from rowers.utils import NoTokenError
|
||||||
|
|
||||||
import rowers.payments as payments
|
import rowers.payments as payments
|
||||||
@@ -49,6 +51,17 @@ def adaptive(s):
|
|||||||
|
|
||||||
return u
|
return u
|
||||||
|
|
||||||
|
@register.filter
|
||||||
|
def boatclass(s):
|
||||||
|
u = s
|
||||||
|
|
||||||
|
for e,v in workouttypes:
|
||||||
|
if e.lower() == u.lower():
|
||||||
|
u = v
|
||||||
|
continue
|
||||||
|
|
||||||
|
return u
|
||||||
|
|
||||||
@register.filter
|
@register.filter
|
||||||
def sex(s):
|
def sex(s):
|
||||||
u = s
|
u = s
|
||||||
|
|||||||
Reference in New Issue
Block a user