Merge branch 'release/v6.62'
This commit is contained in:
@@ -2199,15 +2199,16 @@ def interactive_chart(id=0,promember=0):
|
||||
|
||||
hover.mode = 'mouse'
|
||||
|
||||
plot.extra_y_ranges["hrax"] = Range1d(start=100,end=200)
|
||||
plot.line('time','hr',source=source,color="red",
|
||||
y_range_name="hrax", legend="Heart Rate")
|
||||
plot.add_layout(LinearAxis(y_range_name="hrax",axis_label="HR"),'right')
|
||||
plot.extra_y_ranges["spmax"] = Range1d(start=10,end=45)
|
||||
plot.line('time','spm',source=source,color="red",
|
||||
y_range_name="spmax", legend="Stroke Rate")
|
||||
plot.add_layout(LinearAxis(y_range_name="spmax",axis_label="SPM"),'right')
|
||||
|
||||
plot.legend.location = "bottom_right"
|
||||
|
||||
script, div = components(plot)
|
||||
|
||||
|
||||
return [script,div]
|
||||
|
||||
def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
||||
|
||||
@@ -1349,6 +1349,7 @@ class VirtualRaceResult(models.Model):
|
||||
verbose_name='Weight Category')
|
||||
race = models.ForeignKey(VirtualRace)
|
||||
duration = models.TimeField(default=datetime.time(1,0))
|
||||
distance = models.IntegerField(default=0)
|
||||
boattype = models.CharField(choices=boattypes,max_length=40,
|
||||
default='1x',
|
||||
verbose_name = 'Boat Type'
|
||||
|
||||
@@ -720,6 +720,7 @@ def add_workout_race(ws,race,r):
|
||||
return result,comments, errors
|
||||
|
||||
record.coursecompleted=coursecompleted
|
||||
record.distance = int(coursemeters)
|
||||
record.workoutid=ws[0].id
|
||||
record.duration = duration
|
||||
record.save()
|
||||
|
||||
@@ -102,6 +102,11 @@ def do_refresh_token(refreshtoken):
|
||||
refresh_token = token_json['refresh_token']
|
||||
except KeyError:
|
||||
refresh_token = refreshtoken
|
||||
try:
|
||||
expires_in = int(expires_in)
|
||||
except (TypeError,ValueError):
|
||||
expires_in = 0
|
||||
|
||||
|
||||
return [thetoken,expires_in,refresh_token]
|
||||
|
||||
@@ -131,6 +136,10 @@ def get_token(code):
|
||||
refresh_token = token_json['refresh_token']
|
||||
except KeyError:
|
||||
refresh_token = refreshtoken
|
||||
try:
|
||||
expires_in = int(expires_in)
|
||||
except (ValueError,TypeError):
|
||||
expires_in = 0
|
||||
else:
|
||||
return [0,0,0]
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<th>Country</th><td>{{ course.country }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Notes</th><td>{{ course.notes }}</td>
|
||||
<th>Notes</th><td>{{ course.notes|linebreaks }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<th>Event</th>
|
||||
<th>Country</th>
|
||||
<th>Course</th>
|
||||
<th>Distance</th>
|
||||
<th>Click for Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -25,6 +26,7 @@
|
||||
<td><a href="/rowers/virtualevent/{{ race.id }}">{{ race.name }}</a></td>
|
||||
<td>{{ race.course.country }}</td>
|
||||
<td><a href="/rowers/courses/{{ race.course.id }}">{{ race.course.name }}</a></td>
|
||||
<td>{{ race.sessionvalue }} m</td>
|
||||
<td>
|
||||
{% if rower %}
|
||||
{% if race|can_register:rower %}
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<tr>
|
||||
<th>Course</th><td>{{ race.course }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Distance</th><td>{{ race.sessionvalue }} m</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Registration closure</th>
|
||||
<td>{{ race.registration_closure }}</td>
|
||||
@@ -98,6 +101,7 @@
|
||||
<th> </th>
|
||||
<th>Boat</th>
|
||||
<th>Time</th>
|
||||
<th>Distance</th>
|
||||
<th>Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -114,6 +118,7 @@
|
||||
<td>{{ result.weightcategory }}</td>
|
||||
<td>{{ result.boattype }}</td>
|
||||
<td>{{ result.duration |durationprint:"%H:%M:%S.%f" }}</td>
|
||||
<td>{{ result.distance }} m</td>
|
||||
<td>
|
||||
<a href="/rowers/workout/{{ result.workoutid }}">
|
||||
Details</a></td>
|
||||
|
||||
@@ -2662,6 +2662,7 @@ def rower_process_sporttrackscallback(request):
|
||||
access_token = res[0]
|
||||
expires_in = res[1]
|
||||
refresh_token = res[2]
|
||||
|
||||
expirydatetime = timezone.now()+datetime.timedelta(seconds=expires_in)
|
||||
|
||||
r = getrower(request.user)
|
||||
@@ -9597,6 +9598,8 @@ def workout_sporttracksimport_view(request,message=""):
|
||||
if (r.sporttrackstoken == '') or (r.sporttrackstoken is None):
|
||||
s = "Token doesn't exist. Need to authorize"
|
||||
return HttpResponseRedirect("/rowers/me/sporttracksauthorize/")
|
||||
else:
|
||||
return HttpResponseRedirect("/rowers/me/sporttracksrefresh/")
|
||||
message = "Something went wrong in workout_sporttracksimport_view"
|
||||
messages.error(request,message)
|
||||
if settings.DEBUG:
|
||||
@@ -13624,6 +13627,7 @@ def virtualevent_create_view(request):
|
||||
course=geocourse,
|
||||
comment=comment,
|
||||
sessiontype = 'coursetest',
|
||||
sessionvalue = sessionvalue,
|
||||
timezone=timezone_str,
|
||||
evaluation_closure=evaluation_closure,
|
||||
registration_closure=registration_closure,
|
||||
|
||||
Reference in New Issue
Block a user