Private
Public Access
1
0

debugging oauth

This commit is contained in:
Sander Roosendaal
2018-03-29 11:22:05 -07:00
parent b134d1cba6
commit cf3a3e227d
4 changed files with 34 additions and 9 deletions

View File

@@ -11480,7 +11480,10 @@ def strokedatajson(request,id):
df.index = df.index.astype(int)
df.sort_index(inplace=True)
# time, hr, pace, spm, power, drivelength, distance, drivespeed, dragfactor, strokerecoverytime, averagedriveforce, peakdriveforce, lapidx
time = df['time']/1.e3
try:
time = df['time']/1.e3
except KeyError:
return HttpResponse("There must be time values",status=400)
aantal = len(time)
pace = df['pace']/1.e3
if len(pace) != aantal:
@@ -11508,11 +11511,11 @@ def strokedatajson(request,id):
lapidx = trydf(df,aantal,'lapidx')
hr = trydf(df,aantal,'hr')
starttime = totimestamp(row.startdatetime)+time
starttime = totimestamp(row.startdatetime)+time[0]
unixtime = starttime+time
with open('media/apilog.log','a') as logfile:
logfile.write(starttime+": ")
logfile.write(str(starttime)+": ")
logfile.write(request.user.username+"(POST) \r\n")
data = pd.DataFrame({'TimeStamp (sec)':unixtime,