Private
Public Access
1
0

adding athlete names to analysis

This commit is contained in:
Sander Roosendaal
2022-09-15 12:11:06 +02:00
parent a68e571010
commit 6beae2ca37
5 changed files with 50 additions and 8 deletions

View File

@@ -459,6 +459,7 @@ def trendflexdata(workouts, options, userid=0):
u = User.objects.get(id=userid)
extratitle = ' '+u.first_name+' '+u.last_name
script, div = interactive_multiflex(df, xparam, yparam,
groupby,
extratitle=extratitle,
@@ -484,10 +485,19 @@ def flexalldata(workouts, options):
workstrokesonly = not includereststrokes
userid = options['userid']
if userid == 0: # pragma: no cover
extratitle = ''
else:
u = User.objects.get(id=userid)
extratitle = ' '+u.first_name+' '+u.last_name
res = interactive_cum_flex_chart2(workouts, xparam=xparam,
yparam1=yparam1,
yparam2=yparam2,
promember=promember,
extratitle=extratitle,
workstrokesonly=workstrokesonly,
trendline=trendline,
)
@@ -507,9 +517,18 @@ def histodata(workouts, options):
spmmax = options['spmmax']
workmin = options['workmin']
workmax = options['workmax']
userid = options['userid']
if userid == 0: # pragma: no cover
extratitle = ''
else:
u = User.objects.get(id=userid)
extratitle = ' '+u.first_name+' '+u.last_name
script, div = interactive_histoall(workouts, plotfield, includereststrokes,
spmmin=spmmin, spmmax=spmmax,
extratitle=extratitle,
workmin=workmin, workmax=workmax)
scripta = script.split('\n')[2:-1]
@@ -675,6 +694,14 @@ def statsdata(workouts, options):
includereststrokes = options['includereststrokes']
ids = options['ids']
userid = options['userid']
if userid == 0: # pragma: no cover
extratitle = ''
else:
u = User.objects.get(id=userid)
extratitle = ' '+u.first_name+' '+u.last_name
workstrokesonly = not includereststrokes
ids = [w.id for w in workouts]
@@ -728,6 +755,7 @@ def statsdata(workouts, options):
context = {
'stats': stats,
'cordict': cordict,
'extratitle': extratitle,
}
htmly = env.get_template('statsdiv.html')