form test changes
This commit is contained in:
@@ -1726,6 +1726,13 @@ class TrainingMicroCycleForm(ModelForm):
|
||||
'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)
|
||||
class PlannedSession(models.Model):
|
||||
@@ -1740,6 +1747,14 @@ class PlannedSession(models.Model):
|
||||
('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 = (
|
||||
('distance','Distance'),
|
||||
('time','Time'),
|
||||
@@ -2012,6 +2027,7 @@ class PlannedSessionForm(ModelForm):
|
||||
def __init__(self,*args,**kwargs):
|
||||
super(PlannedSessionForm, self).__init__(*args, **kwargs)
|
||||
self.fields['course'].queryset = GeoCourse.objects.all().order_by("country","name")
|
||||
self.fields['sessiontype'].choices = regularsessiontypechoices
|
||||
|
||||
|
||||
def get_course_timezone(course):
|
||||
@@ -2293,6 +2309,13 @@ class VirtualRaceForm(ModelForm):
|
||||
return cd
|
||||
|
||||
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:
|
||||
model = PlannedSession
|
||||
@@ -2321,7 +2344,11 @@ class PlannedSessionFormSmall(ModelForm):
|
||||
'sessionvalue': forms.TextInput(attrs={'style':'width:5em',
|
||||
'type':'number'}),
|
||||
'manager': forms.HiddenInput(),
|
||||
}
|
||||
}
|
||||
|
||||
def __init__(self,*args,**kwargs):
|
||||
super(PlannedSessionFormSmall, self).__init__(*args, **kwargs)
|
||||
self.fields['sessiontype'].choices = regularsessiontypechoices
|
||||
|
||||
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>
|
||||
</Track>
|
||||
</Lap>
|
||||
<Notes><Element 'Notes' at 0x13a97908></Notes>
|
||||
<Notes><Element 'Notes' at 0x14de02b0></Notes>
|
||||
</Activity>
|
||||
</Activities>
|
||||
<Creator>
|
||||
|
||||
Reference in New Issue
Block a user