adding user setting for CP duration range - default is 42 days
This commit is contained in:
@@ -756,6 +756,13 @@ class Rower(models.Model):
|
||||
('y','y'),
|
||||
)
|
||||
|
||||
cppresets = (
|
||||
(42,'6 weeks'),
|
||||
(91,'13 weeks'),
|
||||
(183,'26 weeks'),
|
||||
(365,'a year')
|
||||
)
|
||||
|
||||
user = models.OneToOneField(User,on_delete=models.CASCADE)
|
||||
|
||||
#billing details
|
||||
@@ -837,7 +844,8 @@ class Rower(models.Model):
|
||||
ep3 = models.FloatField(default=1.0,verbose_name="erg CP p4")
|
||||
ecpratio = models.FloatField(default=1.0,verbose_name="erg CP fit ratio")
|
||||
|
||||
|
||||
cprange = models.IntegerField(default=42,verbose_name="Range for calculation breakthrough workouts and fitness (CP)",
|
||||
choices=cppresets)
|
||||
|
||||
otwslack = models.IntegerField(default=0,verbose_name="OTW Power slack")
|
||||
|
||||
@@ -3538,6 +3546,11 @@ class RowerPowerForm(ModelForm):
|
||||
model = Rower
|
||||
fields = ['hrftp','ftp','otwslack']
|
||||
|
||||
class RowerCPForm(ModelForm):
|
||||
class Meta:
|
||||
model = Rower
|
||||
fields = ['cprange']
|
||||
|
||||
# Form to set rower's Power zones, including test routines
|
||||
# to enable consistency
|
||||
class RowerPowerZonesForm(ModelForm):
|
||||
|
||||
Reference in New Issue
Block a user