form test changes
This commit is contained in:
@@ -1726,6 +1726,13 @@ class TrainingMicroCycleForm(ModelForm):
|
|||||||
'enddate': AdminDateWidget()
|
'enddate': AdminDateWidget()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
regularsessiontypechoices = (
|
||||||
|
('session','Training Session'),
|
||||||
|
('challenge','Challenge'),
|
||||||
|
('test','Mandatory Test'),
|
||||||
|
('cycletarget','Total for a time period'),
|
||||||
|
('coursetest','OTW test over a course'),
|
||||||
|
)
|
||||||
|
|
||||||
# model for Planned Session (Workout, Challenge, Test)
|
# model for Planned Session (Workout, Challenge, Test)
|
||||||
class PlannedSession(models.Model):
|
class PlannedSession(models.Model):
|
||||||
@@ -1740,6 +1747,14 @@ class PlannedSession(models.Model):
|
|||||||
('indoorrace','Indoor Virtual Race'),
|
('indoorrace','Indoor Virtual Race'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
regularsessiontypechoices = (
|
||||||
|
('session','Training Session'),
|
||||||
|
('challenge','Challenge'),
|
||||||
|
('test','Mandatory Test'),
|
||||||
|
('cycletarget','Total for a time period'),
|
||||||
|
('coursetest','OTW test over a course'),
|
||||||
|
)
|
||||||
|
|
||||||
sessionmodechoices = (
|
sessionmodechoices = (
|
||||||
('distance','Distance'),
|
('distance','Distance'),
|
||||||
('time','Time'),
|
('time','Time'),
|
||||||
@@ -2012,6 +2027,7 @@ class PlannedSessionForm(ModelForm):
|
|||||||
def __init__(self,*args,**kwargs):
|
def __init__(self,*args,**kwargs):
|
||||||
super(PlannedSessionForm, self).__init__(*args, **kwargs)
|
super(PlannedSessionForm, self).__init__(*args, **kwargs)
|
||||||
self.fields['course'].queryset = GeoCourse.objects.all().order_by("country","name")
|
self.fields['course'].queryset = GeoCourse.objects.all().order_by("country","name")
|
||||||
|
self.fields['sessiontype'].choices = regularsessiontypechoices
|
||||||
|
|
||||||
|
|
||||||
def get_course_timezone(course):
|
def get_course_timezone(course):
|
||||||
@@ -2293,6 +2309,13 @@ class VirtualRaceForm(ModelForm):
|
|||||||
return cd
|
return cd
|
||||||
|
|
||||||
class PlannedSessionFormSmall(ModelForm):
|
class PlannedSessionFormSmall(ModelForm):
|
||||||
|
regularsessiontypechoices = (
|
||||||
|
('session','Training Session'),
|
||||||
|
('challenge','Challenge'),
|
||||||
|
('test','Mandatory Test'),
|
||||||
|
('cycletarget','Total for a time period'),
|
||||||
|
('coursetest','OTW test over a course'),
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = PlannedSession
|
model = PlannedSession
|
||||||
@@ -2321,7 +2344,11 @@ class PlannedSessionFormSmall(ModelForm):
|
|||||||
'sessionvalue': forms.TextInput(attrs={'style':'width:5em',
|
'sessionvalue': forms.TextInput(attrs={'style':'width:5em',
|
||||||
'type':'number'}),
|
'type':'number'}),
|
||||||
'manager': forms.HiddenInput(),
|
'manager': forms.HiddenInput(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def __init__(self,*args,**kwargs):
|
||||||
|
super(PlannedSessionFormSmall, self).__init__(*args, **kwargs)
|
||||||
|
self.fields['sessiontype'].choices = regularsessiontypechoices
|
||||||
|
|
||||||
boattypes = mytypes.boattypes
|
boattypes = mytypes.boattypes
|
||||||
|
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
2
rowers/tests/testdata/testdata.tcx
vendored
2
rowers/tests/testdata/testdata.tcx
vendored
@@ -2502,7 +2502,7 @@
|
|||||||
</Trackpoint>
|
</Trackpoint>
|
||||||
</Track>
|
</Track>
|
||||||
</Lap>
|
</Lap>
|
||||||
<Notes><Element 'Notes' at 0x13a97908></Notes>
|
<Notes><Element 'Notes' at 0x14de02b0></Notes>
|
||||||
</Activity>
|
</Activity>
|
||||||
</Activities>
|
</Activities>
|
||||||
<Creator>
|
<Creator>
|
||||||
|
|||||||
Reference in New Issue
Block a user