added kfit and kfatigue to profile page
This commit is contained in:
@@ -1555,14 +1555,14 @@ def performancemanager_view(request,userid=0,mode='rower',
|
||||
therower = getrequestrower(request,userid=userid)
|
||||
theuser = therower.user
|
||||
|
||||
kfitness = 42
|
||||
kfatigue = 7
|
||||
kfitness = therower.kfit
|
||||
kfatigue = therower.kfatigue
|
||||
fitnesstest = 20
|
||||
metricchoice = 'trimp'
|
||||
modelchoice = 'tsb'
|
||||
usefitscore = False
|
||||
doform = False
|
||||
dofatigue = False
|
||||
doform = therower.showfresh
|
||||
dofatigue = therower.showfit
|
||||
|
||||
if request.method == 'POST':
|
||||
form = PerformanceManagerForm(request.POST)
|
||||
@@ -1572,6 +1572,9 @@ def performancemanager_view(request,userid=0,mode='rower',
|
||||
metricchoice = form.cleaned_data['metricchoice']
|
||||
dofatigue = form.cleaned_data['dofatigue']
|
||||
doform = form.cleaned_data['doform']
|
||||
therower.showfresh = doform
|
||||
therower.showfatigue = dofatigue
|
||||
therower.save()
|
||||
else:
|
||||
form = PerformanceManagerForm()
|
||||
|
||||
@@ -1600,7 +1603,7 @@ def performancemanager_view(request,userid=0,mode='rower',
|
||||
'script':script,
|
||||
'div':thediv,
|
||||
})
|
||||
|
||||
|
||||
return(HttpResponse(response,content_type='application/json'))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user