analysisviews pep
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import time
|
||||
from rowers.forms import analysischoices
|
||||
from django.contrib.staticfiles import finders
|
||||
from rowers.views.statements import *
|
||||
|
||||
import collections
|
||||
import simplejson
|
||||
from jinja2 import Template, Environment, FileSystemLoader
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from rowers.rower_rules import can_view_session
|
||||
|
||||
|
||||
@@ -28,10 +24,16 @@ defaultoptions = {
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user,"
|
||||
" please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
@permission_required('rower.is_coach', fn=get_user_by_userid, raise_exception=True)
|
||||
def analysis_new(request, userid=0, function='boxplot', teamid=0, id='', session=0):
|
||||
@permission_required('rower.is_coach',
|
||||
fn=get_user_by_userid,
|
||||
raise_exception=True)
|
||||
def analysis_new(request,
|
||||
userid=0,
|
||||
function='boxplot', teamid=0, id='', session=0):
|
||||
r = getrequestrower(request, userid=userid)
|
||||
user = r.user
|
||||
userid = user.id
|
||||
@@ -62,10 +64,6 @@ def analysis_new(request, userid=0, function='boxplot', teamid=0, id='', session
|
||||
options = defaultoptions
|
||||
|
||||
options['userid'] = userid
|
||||
try:
|
||||
workouttypes = options['workouttypes']
|
||||
except KeyError: # pragma: no cover
|
||||
workouttypes = ['rower', 'dynamic', 'slides']
|
||||
|
||||
try:
|
||||
modalities = options['modalities']
|
||||
@@ -79,11 +77,6 @@ def analysis_new(request, userid=0, function='boxplot', teamid=0, id='', session
|
||||
except KeyError:
|
||||
worldclass = False
|
||||
|
||||
try:
|
||||
includereststrokes = options['includereststrokes']
|
||||
except KeyError: # pragma: no cover
|
||||
includereststrokes = False
|
||||
|
||||
if 'startdate' in request.session:
|
||||
startdate = iso8601.parse_date(request.session['startdate'])
|
||||
else:
|
||||
@@ -97,8 +90,6 @@ def analysis_new(request, userid=0, function='boxplot', teamid=0, id='', session
|
||||
else:
|
||||
enddate = timezone.now()
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
waterboattype = mytypes.waterboattype
|
||||
|
||||
if request.method == 'POST':
|
||||
@@ -296,15 +287,9 @@ def trendflexdata(workouts, options, userid=0):
|
||||
workmin = options['workmin']
|
||||
workmax = options['workmax']
|
||||
ploterrorbars = options['ploterrorbars']
|
||||
cpfit = options['cpfit']
|
||||
piece = options['piece']
|
||||
ids = options['ids']
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
labeldict = {
|
||||
int(w.id): w.__str__() for w in workouts
|
||||
}
|
||||
|
||||
fieldlist, fielddict = dataprep.getstatsfields()
|
||||
fieldlist = [xparam, yparam, groupby,
|
||||
'workoutid', 'spm', 'driveenergy',
|
||||
@@ -315,7 +300,7 @@ def trendflexdata(workouts, options, userid=0):
|
||||
|
||||
if xparam == groupby: # pragma: no cover
|
||||
datadf['groupby'] = datadf[xparam]
|
||||
groupy = 'groupby'
|
||||
groupby = 'groupby'
|
||||
|
||||
datadf = dataprep.clean_df_stats(datadf, workstrokesonly=workstrokesonly)
|
||||
|
||||
@@ -497,16 +482,14 @@ def flexalldata(workouts, options):
|
||||
def histodata(workouts, options):
|
||||
includereststrokes = options['includereststrokes']
|
||||
plotfield = options['plotfield']
|
||||
function = options['function']
|
||||
spmmin = options['spmmin']
|
||||
spmmax = options['spmmax']
|
||||
workmin = options['workmin']
|
||||
workmax = options['workmax']
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
script, div = interactive_histoall(workouts, plotfield, includereststrokes,
|
||||
spmmin=spmmin, spmmax=spmmax, workmin=workmin, workmax=workmax)
|
||||
spmmin=spmmin, spmmax=spmmax,
|
||||
workmin=workmin, workmax=workmax)
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
@@ -522,7 +505,6 @@ def cpdata(workouts, options):
|
||||
u = User.objects.get(id=userid)
|
||||
r = u.rower
|
||||
|
||||
ids = [w.id for w in workouts]
|
||||
delta, cpvalue, avgpower, workoutnames, urls = dataprep.fetchcp_new(
|
||||
r, workouts)
|
||||
|
||||
@@ -565,7 +547,6 @@ def cpdata(workouts, options):
|
||||
if r.birthdate:
|
||||
age = calculate_age(r.birthdate)
|
||||
else: # pragma: no cover
|
||||
worldclasspower = None
|
||||
age = 0
|
||||
|
||||
agerecords = CalcAgePerformance.objects.filter(
|
||||
@@ -597,17 +578,11 @@ def cpdata(workouts, options):
|
||||
div = res[1]
|
||||
p1 = res[2]
|
||||
ratio = res[3]
|
||||
paulslope = 1
|
||||
paulintercept = 1
|
||||
message = res[4]
|
||||
else: # pragma: no cover
|
||||
script = ''
|
||||
div = '<p>No ranking pieces found.</p>'
|
||||
paulslope = 1
|
||||
paulintercept = 1
|
||||
p1 = [1, 1, 1, 1]
|
||||
ratio = 1
|
||||
message = ""
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
@@ -677,23 +652,12 @@ def cpdata(workouts, options):
|
||||
|
||||
def statsdata(workouts, options):
|
||||
includereststrokes = options['includereststrokes']
|
||||
spmmin = options['spmmin']
|
||||
spmmax = options['spmmax']
|
||||
workmin = options['workmin']
|
||||
workmax = options['workmax']
|
||||
ids = options['ids']
|
||||
userid = options['userid']
|
||||
plotfield = options['plotfield']
|
||||
function = options['function']
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
ids = [w.id for w in workouts]
|
||||
|
||||
datamapping = {
|
||||
w.id: w.date for w in workouts
|
||||
}
|
||||
|
||||
fieldlist, fielddict = dataprep.getstatsfields()
|
||||
# prepare data frame
|
||||
datadf, extracols = dataprep.read_cols_df_sql(ids, fieldlist)
|
||||
@@ -791,12 +755,8 @@ def boxplotdata(workouts, options):
|
||||
ids = options['ids']
|
||||
userid = options['userid']
|
||||
plotfield = options['plotfield']
|
||||
function = options['function']
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
labeldict = {
|
||||
int(w.id): w.__str__() for w in workouts
|
||||
}
|
||||
|
||||
datemapping = {
|
||||
w.id: w.date for w in workouts
|
||||
@@ -838,7 +798,8 @@ def boxplotdata(workouts, options):
|
||||
|
||||
script, div = interactive_boxchart(datadf, plotfield,
|
||||
extratitle=extratitle,
|
||||
spmmin=spmmin, spmmax=spmmax, workmin=workmin, workmax=workmax)
|
||||
spmmin=spmmin, spmmax=spmmax,
|
||||
workmin=workmin, workmax=workmax)
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
@@ -847,7 +808,8 @@ def boxplotdata(workouts, options):
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
@permission_required('rower.is_coach', fn=get_user_by_userid, raise_exception=True)
|
||||
def analysis_view_data(request, userid=0):
|
||||
@@ -922,7 +884,8 @@ def planrequired_view(request):
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
def create_marker_workouts_view(request, userid=0,
|
||||
startdate=timezone.now()-timezone.timedelta(days=42),
|
||||
@@ -936,7 +899,7 @@ def create_marker_workouts_view(request, userid=0,
|
||||
duplicate=False).order_by('date')
|
||||
|
||||
for workout in workouts:
|
||||
w2 = dataprep.check_marker(workout)
|
||||
_ = dataprep.check_marker(workout)
|
||||
|
||||
url = reverse('goldmedalscores_view',
|
||||
kwargs={
|
||||
@@ -946,7 +909,8 @@ def create_marker_workouts_view(request, userid=0,
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
def goldmedalscores_view(request, userid=0,
|
||||
startdate=timezone.now()-timezone.timedelta(days=365),
|
||||
@@ -1010,13 +974,11 @@ def goldmedalscores_view(request, userid=0,
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
@permission_required('rower.is_coach', fn=get_user_by_userid, raise_exception=True)
|
||||
def trainingzones_view(request, userid=0):
|
||||
|
||||
is_ajax = request_is_ajax(request)
|
||||
|
||||
r = getrequestrower(request, userid=userid)
|
||||
|
||||
enddate = timezone.now()
|
||||
@@ -1126,7 +1088,8 @@ def trainingzones_view_data(request, userid=0):
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
@permission_required('rower.is_coach', fn=get_user_by_userid, raise_exception=True)
|
||||
def performancemanager_view(request, userid=0, mode='rower',
|
||||
@@ -1140,10 +1103,8 @@ def performancemanager_view(request, userid=0, mode='rower',
|
||||
|
||||
kfitness = therower.kfit
|
||||
kfatigue = therower.kfatigue
|
||||
fitnesstest = 20
|
||||
metricchoice = 'hrtss'
|
||||
modelchoice = 'tsb'
|
||||
usegoldmedalstandard = False
|
||||
|
||||
doform = therower.showfresh
|
||||
dofatigue = therower.showfit
|
||||
|
||||
@@ -1223,8 +1184,6 @@ def ajax_agegrouprecords(request,
|
||||
weightcategory='hwt',
|
||||
userid=0):
|
||||
|
||||
wcdurations = []
|
||||
wcpower = []
|
||||
durations = [1, 4, 30, 60]
|
||||
distances = [100, 500, 1000, 2000, 5000, 6000, 10000, 21097, 42195]
|
||||
|
||||
@@ -1320,7 +1279,6 @@ def rankings_view2(request, userid=0,
|
||||
if r.birthdate:
|
||||
age = calculate_age(r.birthdate)
|
||||
else:
|
||||
worldclasspower = None
|
||||
age = 0
|
||||
|
||||
agerecords = CalcAgePerformance.objects.filter(
|
||||
@@ -1393,7 +1351,6 @@ def rankings_view2(request, userid=0,
|
||||
try:
|
||||
r = getrower(theuser)
|
||||
except Rower.DoesNotExist: # pragma: no cover
|
||||
allergworkouts = []
|
||||
r = 0
|
||||
|
||||
uu = theuser
|
||||
@@ -1401,7 +1358,6 @@ def rankings_view2(request, userid=0,
|
||||
# test to fix bug
|
||||
startdate = datetime.datetime.combine(startdate, datetime.time())
|
||||
enddate = datetime.datetime.combine(enddate, datetime.time(23, 59, 59))
|
||||
#enddate = enddate+datetime.timedelta(days=1)
|
||||
startdate = arrow.get(startdate).datetime
|
||||
enddate = arrow.get(enddate).datetime
|
||||
|
||||
@@ -1469,11 +1425,6 @@ def rankings_view2(request, userid=0,
|
||||
paulintercept = res[3]
|
||||
p1 = res[4]
|
||||
message = res[5]
|
||||
try:
|
||||
testcalc = pd.Series(res[6], dtype='float')*3
|
||||
except TypeError: # pragma: no cover
|
||||
age = 0
|
||||
|
||||
else:
|
||||
script = ''
|
||||
div = '<p>No ranking pieces found.</p>'
|
||||
@@ -1582,19 +1533,19 @@ def rankings_view2(request, userid=0,
|
||||
pass
|
||||
|
||||
# CP model
|
||||
pwr = p1[0]/(1+t/p1[2])
|
||||
pwr += p1[1]/(1+t/p1[3])
|
||||
pwr = p1[0] / (1 + t / p1[2])
|
||||
pwr += p1[1] / (1 + t / p1[3])
|
||||
|
||||
if pwr <= 0: # pragma: no cover
|
||||
pwr = 50.
|
||||
|
||||
velo = (pwr/2.8)**(1./3.)
|
||||
velo = (pwr / 2.8)**(1. / 3.)
|
||||
|
||||
if np.isnan(velo) or velo <= 0: # pragma: no cover
|
||||
velo = 1.0
|
||||
|
||||
d = t*velo
|
||||
p = 500./velo
|
||||
d = t * velo
|
||||
p = 500. / velo
|
||||
a = {'distance': int(d),
|
||||
'duration': timedeltaconv(t),
|
||||
'pace': timedeltaconv(p),
|
||||
@@ -1653,7 +1604,7 @@ def rankings_view2(request, userid=0,
|
||||
|
||||
@login_required()
|
||||
def otecp_toadmin_view(request, theuser=0,
|
||||
startdate=timezone.now()-datetime.timedelta(days=365),
|
||||
startdate=timezone.now() - datetime.timedelta(days=365),
|
||||
enddate=timezone.now(),
|
||||
startdatestring="",
|
||||
enddatestring="",
|
||||
@@ -1710,13 +1661,13 @@ def otecp_toadmin_view(request, theuser=0,
|
||||
powerdf.drop_duplicates(subset='Delta', keep='first', inplace=True)
|
||||
powerdf.to_csv(csvfilename)
|
||||
|
||||
res = myqueue(queuehigh,
|
||||
handle_sendemailfile,
|
||||
'Sander',
|
||||
'Roosendaal',
|
||||
'roosendaalsander@gmail.com',
|
||||
csvfilename,
|
||||
delete=True)
|
||||
_ = myqueue(queuehigh,
|
||||
handle_sendemailfile,
|
||||
'Sander',
|
||||
'Roosendaal',
|
||||
'roosendaalsander@gmail.com',
|
||||
csvfilename,
|
||||
delete=True)
|
||||
|
||||
successmessage = "The CSV file was sent to the site admin per email"
|
||||
messages.info(request, successmessage)
|
||||
@@ -1727,7 +1678,7 @@ def otecp_toadmin_view(request, theuser=0,
|
||||
|
||||
@login_required()
|
||||
def otwcp_toadmin_view(request, theuser=0,
|
||||
startdate=timezone.now()-datetime.timedelta(days=365),
|
||||
startdate=timezone.now() - datetime.timedelta(days=365),
|
||||
enddate=timezone.now(),
|
||||
startdatestring="",
|
||||
enddatestring="",
|
||||
@@ -1780,13 +1731,13 @@ def otwcp_toadmin_view(request, theuser=0,
|
||||
powerdf.drop_duplicates(subset='Delta', keep='first', inplace=True)
|
||||
powerdf.to_csv(csvfilename)
|
||||
|
||||
res = myqueue(queuehigh,
|
||||
handle_sendemailfile,
|
||||
'Sander',
|
||||
'Roosendaal',
|
||||
'roosendaalsander@gmail.com',
|
||||
csvfilename,
|
||||
delete=True)
|
||||
_ = myqueue(queuehigh,
|
||||
handle_sendemailfile,
|
||||
'Sander',
|
||||
'Roosendaal',
|
||||
'roosendaalsander@gmail.com',
|
||||
csvfilename,
|
||||
delete=True)
|
||||
|
||||
successmessage = "The CSV file was sent to the site admin per email"
|
||||
messages.info(request, successmessage)
|
||||
@@ -1822,7 +1773,7 @@ def agegrouprecordview(request, sex='male', weightcategory='hwt',
|
||||
)
|
||||
)
|
||||
else:
|
||||
duration = int(duration)*60
|
||||
duration = int(duration) * 60
|
||||
df = pd.DataFrame(
|
||||
list(
|
||||
C2WorldClassAgePerformance.objects.filter(
|
||||
@@ -1844,11 +1795,6 @@ def agegrouprecordview(request, sex='male', weightcategory='hwt',
|
||||
'the_div': div,
|
||||
})
|
||||
|
||||
# alert overview view
|
||||
# @user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
# message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
# redirect_field_name=None)
|
||||
|
||||
|
||||
@login_required
|
||||
@permission_required('rower.is_coach', fn=get_user_by_userid, raise_exception=True)
|
||||
@@ -1885,7 +1831,8 @@ def alerts_view(request, userid=0):
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
@permission_required('rower.is_coach', fn=get_user_by_userid, raise_exception=True)
|
||||
def alert_create_view(request, userid=0):
|
||||
@@ -1926,7 +1873,8 @@ def alert_create_view(request, userid=0):
|
||||
}
|
||||
)
|
||||
|
||||
result, message = create_alert(request.user, r, measured, period=period, emailalert=emailalert,
|
||||
result, message = create_alert(request.user, r, measured,
|
||||
period=period, emailalert=emailalert,
|
||||
reststrokes=reststrokes, workouttype=workouttype,
|
||||
boattype=boattype,
|
||||
filter=filters,
|
||||
@@ -2027,7 +1975,8 @@ def alert_report_view(request, id=0, userid=0, nperiod=0):
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
@permission_required('rower.is_coach', fn=get_user_by_userid, raise_exception=True)
|
||||
def alert_edit_view(request, id=0, userid=0):
|
||||
@@ -2100,7 +2049,7 @@ def alert_edit_view(request, id=0, userid=0):
|
||||
}
|
||||
)
|
||||
|
||||
res = alert_add_filters(alert, filters)
|
||||
_ = alert_add_filters(alert, filters)
|
||||
messages.info(request, 'Alert was changed')
|
||||
|
||||
else:
|
||||
@@ -2193,7 +2142,8 @@ class AlertDelete(DeleteView):
|
||||
|
||||
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
message="This functionality requires a Pro plan or higher."
|
||||
" If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
@permission_required('rower.is_coach', fn=get_user_by_userid, raise_exception=True)
|
||||
def history_view(request, userid=0):
|
||||
@@ -2216,7 +2166,7 @@ def history_view(request, userid=0):
|
||||
activity_enddate = timezone.now()
|
||||
activity_enddate = usertimezone.localize(
|
||||
timezone.datetime.combine(activity_enddate.date(), time_max))
|
||||
startdate = timezone.now()-datetime.timedelta(days=14)
|
||||
startdate = timezone.now() - datetime.timedelta(days=14)
|
||||
activity_startdate = usertimezone.localize(
|
||||
timezone.datetime.combine(startdate.date(), time_min))
|
||||
sstartdate = activity_startdate.date
|
||||
@@ -2246,10 +2196,6 @@ def history_view(request, userid=0):
|
||||
privacy='visible'
|
||||
).order_by("-startdatetime")
|
||||
|
||||
ids = [w.id for w in g_workouts]
|
||||
|
||||
columns = ['hr', 'power', 'time']
|
||||
|
||||
tscript, tdiv = interactive_workouttype_piechart(g_workouts)
|
||||
|
||||
totalmeters, totalhours, totalminutes, totalseconds = get_totals(
|
||||
@@ -2312,19 +2258,19 @@ def history_view(request, userid=0):
|
||||
},
|
||||
]
|
||||
|
||||
lastseven = timezone.now()-datetime.timedelta(days=7)
|
||||
lastfourteen = timezone.now()-datetime.timedelta(days=14)
|
||||
last28 = timezone.now()-datetime.timedelta(days=28)
|
||||
lastseven = timezone.now() - datetime.timedelta(days=7)
|
||||
lastfourteen = timezone.now() - datetime.timedelta(days=14)
|
||||
last28 = timezone.now() - datetime.timedelta(days=28)
|
||||
|
||||
today = timezone.now()
|
||||
|
||||
lastyear = datetime.datetime(
|
||||
year=today.year-1, month=today.month, day=today.day)
|
||||
year=today.year - 1, month=today.month, day=today.day)
|
||||
|
||||
firstmay = datetime.datetime(
|
||||
year=today.year, month=5, day=1).astimezone(usertimezone)
|
||||
if firstmay > today: # pragma: no cover
|
||||
firstmay = datetime.datetime(year=today.year-1, month=5, day=1)
|
||||
firstmay = datetime.datetime(year=today.year - 1, month=5, day=1)
|
||||
|
||||
return render(request, 'history.html',
|
||||
{
|
||||
@@ -2361,7 +2307,7 @@ def history_view_data(request, userid=0):
|
||||
time_min = datetime.time(hour=0, minute=0, second=0)
|
||||
time_max = datetime.time(hour=23, minute=59, second=59)
|
||||
|
||||
startdate = timezone.now()-datetime.timedelta(days=14)
|
||||
startdate = timezone.now() - datetime.timedelta(days=14)
|
||||
enddate = timezone.now()
|
||||
activity_enddate = usertimezone.localize(
|
||||
timezone.datetime.combine(enddate.date(), time_max))
|
||||
@@ -2491,13 +2437,13 @@ def history_view_data(request, userid=0):
|
||||
|
||||
# interactive hr pie chart
|
||||
if typeselect == 'All':
|
||||
totalseconds = 3600*totalhours+60*totalminutes+totalseconds
|
||||
totalseconds = 3600 * totalhours + 60 * totalminutes + totalseconds
|
||||
totalscript, totaldiv = interactive_hr_piechart(df, r, 'All Workouts',
|
||||
totalseconds=totalseconds)
|
||||
else:
|
||||
a_workouts = g_workouts.filter(workouttype=typeselect)
|
||||
meters, hours, minutes, seconds = get_totals(a_workouts)
|
||||
totalseconds = 3600*hours+60*minutes+seconds
|
||||
totalseconds = 3600 * hours + 60 * minutes + seconds
|
||||
ddf = getsmallrowdata_db(columns, ids=[w.id for w in a_workouts])
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user