otwranking and oteranking improved forms
This commit is contained in:
@@ -288,6 +288,20 @@ class WorkoutSplitForm(forms.Form):
|
||||
# trial and predict the pace
|
||||
from rowers.utils import rankingdistances,rankingdurations
|
||||
from time import strftime
|
||||
class OteWorkoutTypeForm(forms.Form):
|
||||
choices = (
|
||||
('rower','Indoor Rower'),
|
||||
('dynamic','Dynamic Indoor Rower'),
|
||||
('slides','Indoor Rower on Slides'),
|
||||
)
|
||||
|
||||
workouttypes = forms.MultipleChoiceField(
|
||||
required=True,
|
||||
choices=choices,
|
||||
label='Workout Types',
|
||||
initial = [a for a,b in choices],
|
||||
)
|
||||
|
||||
class PredictedPieceForm(forms.Form):
|
||||
unitchoices = (
|
||||
('t','minutes'),
|
||||
@@ -318,13 +332,33 @@ class PredictedPieceForm(forms.Form):
|
||||
label='Ranking Durations'
|
||||
)
|
||||
|
||||
value = forms.FloatField(initial=10,label='Free ranking piece')
|
||||
value = forms.FloatField(initial=10,label='Free ranking piece (minutes)')
|
||||
pieceunit = forms.ChoiceField(required=True,choices=unitchoices,
|
||||
initial='t',label='Unit')
|
||||
|
||||
class Meta:
|
||||
fields = ['value','pieceunit']
|
||||
|
||||
class PredictedPieceFormNoDistance(forms.Form):
|
||||
|
||||
rankingdurationchoices = []
|
||||
|
||||
for d in rankingdurations:
|
||||
timestr = d.strftime("%H:%M:%S")
|
||||
thetuple = (timestr,timestr)
|
||||
rankingdurationchoices.append(thetuple)
|
||||
|
||||
|
||||
trankingdurations = forms.MultipleChoiceField(
|
||||
required=True,
|
||||
choices=rankingdurationchoices,
|
||||
initial=[a for a,b in rankingdurationchoices],
|
||||
label='Ranking Durations'
|
||||
)
|
||||
|
||||
value = forms.FloatField(initial=10,label='Free ranking piece')
|
||||
|
||||
|
||||
# On the Geeky side, to update stream information for river dwellers
|
||||
class UpdateStreamForm(forms.Form):
|
||||
unitchoices = (
|
||||
|
||||
Reference in New Issue
Block a user