adding dist
This commit is contained in:
@@ -2336,6 +2336,7 @@ def history_view(request,userid=0):
|
||||
wminutes=wminutes,
|
||||
wseconds=wseconds,
|
||||
)
|
||||
ddict['distance'] = wmeters
|
||||
ddict['nrworkouts'] = a_workouts.count()
|
||||
listofdicts.append(ddict)
|
||||
|
||||
@@ -2439,9 +2440,11 @@ def history_view_data(request,userid=0):
|
||||
|
||||
yaxis = request.GET.get('yaxis','duration')
|
||||
|
||||
if yaxis.lower() not in ['duration','rscore','trimp']: # pragma: no cover
|
||||
|
||||
if yaxis.lower() not in ['duration','rscore','trimp','distance']: # pragma: no cover
|
||||
yaxis = 'duration'
|
||||
|
||||
|
||||
g_workouts = Workout.objects.filter(
|
||||
user=r,
|
||||
startdatetime__gte=activity_startdate,
|
||||
@@ -2535,9 +2538,11 @@ def history_view_data(request,userid=0):
|
||||
|
||||
totalsdict['nrworkouts'] = g_workouts.count()
|
||||
|
||||
|
||||
# activity chart
|
||||
activity_script, activity_div = interactive_activitychart2(g_workouts,startdate,enddate,yaxis=yaxis)
|
||||
|
||||
|
||||
# interactive hr pie chart
|
||||
if typeselect == 'All':
|
||||
totalseconds = 3600*totalhours+60*totalminutes+totalseconds
|
||||
|
||||
Reference in New Issue
Block a user