adding rpe and goldmedalstandard
This commit is contained in:
@@ -1656,7 +1656,7 @@ def getfatigues(
|
|||||||
weight = 0
|
weight = 0
|
||||||
for w in ws:
|
for w in ws:
|
||||||
weight += factor*getattr(w,metricchoice)
|
weight += factor*getattr(w,metricchoice)
|
||||||
if getattr(w,metricchoice) == 0:
|
if getattr(w,metricchoice) <= 0:
|
||||||
if metricchoice == 'rscore' and w.hrtss != 0:
|
if metricchoice == 'rscore' and w.hrtss != 0:
|
||||||
weight+= factor*w.hrtss
|
weight+= factor*w.hrtss
|
||||||
else:
|
else:
|
||||||
@@ -1866,7 +1866,7 @@ def performance_chart(user,startdate=None,enddate=None,kfitness=42,kfatigue=7,
|
|||||||
toolbar_location=None,
|
toolbar_location=None,
|
||||||
toolbar_sticky=False)
|
toolbar_sticky=False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
plot2.x_range = xrange
|
plot2.x_range = xrange
|
||||||
plot2.y_range = Range1d(0,df['impulse'].max())
|
plot2.y_range = Range1d(0,df['impulse'].max())
|
||||||
|
|||||||
@@ -2904,6 +2904,15 @@ class Workout(models.Model):
|
|||||||
privacychoices = mytypes.privacychoices
|
privacychoices = mytypes.privacychoices
|
||||||
adaptivetypes = mytypes.adaptivetypes
|
adaptivetypes = mytypes.adaptivetypes
|
||||||
boatbrands = mytypes.boatbrands
|
boatbrands = mytypes.boatbrands
|
||||||
|
rpechoices = (
|
||||||
|
(1,'Very Easy (reading a book, watching television)'), # 20 TSS / hour
|
||||||
|
(2,'Easy (talk, breathe normally, feels comfortable)'), # 30 TSS / hour
|
||||||
|
(4,'Moderate (talk in short spurts, breathing more labored, in comfort zone but working)'), # 50 TSS/hour
|
||||||
|
(6,'Somewhat Hard'), # 70 TSS / hour
|
||||||
|
(8,'Hard (could barely talk, breathing heavily)'), # 100 TSS / hour
|
||||||
|
(9,'Very Hard (outside comfort zone)'), # 120 TSS / hour
|
||||||
|
(10,'Max Effort (could barely remember your name)') # 140 TSS / hour
|
||||||
|
)
|
||||||
|
|
||||||
user = models.ForeignKey(Rower,on_delete=models.CASCADE)
|
user = models.ForeignKey(Rower,on_delete=models.CASCADE)
|
||||||
team = models.ManyToManyField(Team,blank=True)
|
team = models.ManyToManyField(Team,blank=True)
|
||||||
@@ -2931,12 +2940,18 @@ class Workout(models.Model):
|
|||||||
distance = models.IntegerField(default=0,blank=True)
|
distance = models.IntegerField(default=0,blank=True)
|
||||||
duration = models.TimeField(blank=True)
|
duration = models.TimeField(blank=True)
|
||||||
dragfactor = models.IntegerField(default=0,blank=True)
|
dragfactor = models.IntegerField(default=0,blank=True)
|
||||||
|
|
||||||
|
# scores
|
||||||
trimp = models.IntegerField(default=-1,blank=True)
|
trimp = models.IntegerField(default=-1,blank=True)
|
||||||
rscore = models.IntegerField(default=-1,blank=True)
|
rscore = models.IntegerField(default=-1,blank=True)
|
||||||
hrtss = models.IntegerField(default=-1,blank=True)
|
hrtss = models.IntegerField(default=-1,blank=True)
|
||||||
normp = models.IntegerField(default=-1,blank=True)
|
normp = models.IntegerField(default=-1,blank=True)
|
||||||
normv = models.FloatField(default=-1,blank=True)
|
normv = models.FloatField(default=-1,blank=True)
|
||||||
normw = models.FloatField(default=-1,blank=True)
|
normw = models.FloatField(default=-1,blank=True)
|
||||||
|
goldmedalstandard = models.FloatField(default=-1,blank=True)
|
||||||
|
rpe = models.IntegerField(default=0,blank=True,choices=rpechoices,
|
||||||
|
verbose_name='Rate of Perceived Exertion')
|
||||||
|
|
||||||
weightcategory = models.CharField(
|
weightcategory = models.CharField(
|
||||||
default="hwt",
|
default="hwt",
|
||||||
max_length=10,
|
max_length=10,
|
||||||
@@ -3546,6 +3561,7 @@ class WorkoutForm(ModelForm):
|
|||||||
'dragfactor',
|
'dragfactor',
|
||||||
'weightcategory',
|
'weightcategory',
|
||||||
'adaptiveclass',
|
'adaptiveclass',
|
||||||
|
'rpe',
|
||||||
'notes',
|
'notes',
|
||||||
'rankingpiece',
|
'rankingpiece',
|
||||||
'duplicate',
|
'duplicate',
|
||||||
|
|||||||
@@ -4355,6 +4355,9 @@ def workout_edit_view(request,id=0,message="",successmessage=""):
|
|||||||
notes = form.cleaned_data['notes']
|
notes = form.cleaned_data['notes']
|
||||||
newdragfactor = form.cleaned_data['dragfactor']
|
newdragfactor = form.cleaned_data['dragfactor']
|
||||||
thetimezone = form.cleaned_data['timezone']
|
thetimezone = form.cleaned_data['timezone']
|
||||||
|
rpe = form.cleaned_data['rpe']
|
||||||
|
if not rpe:
|
||||||
|
rpe = -1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ps = form.cleaned_data['plannedsession']
|
ps = form.cleaned_data['plannedsession']
|
||||||
@@ -4421,6 +4424,7 @@ def workout_edit_view(request,id=0,message="",successmessage=""):
|
|||||||
row.weightcategory = weightcategory
|
row.weightcategory = weightcategory
|
||||||
row.adaptiveclass = adaptiveclass
|
row.adaptiveclass = adaptiveclass
|
||||||
row.notes = notes
|
row.notes = notes
|
||||||
|
row.rpe = rpe
|
||||||
row.duration = duration
|
row.duration = duration
|
||||||
row.distance = distance
|
row.distance = distance
|
||||||
row.boattype = boattype
|
row.boattype = boattype
|
||||||
|
|||||||
Reference in New Issue
Block a user