Private
Public Access
1
0

quick and dirty OTE

This commit is contained in:
Sander Roosendaal
2019-11-14 21:56:35 +01:00
parent ad3681723a
commit 28f3941f61
4 changed files with 357 additions and 3 deletions

View File

@@ -196,9 +196,14 @@ def workout_video_create_view(request,id=0):
# get data
data, metrics, maxtime = dataprep.get_video_data(w,groups=metricsgroups)
hascoordinates = pd.Series(data['latitude']).std() > 0
# create map
mapscript, mapdiv = leaflet_chart_video(data['latitude'],data['longitude'],
if hascoordinates:
mapscript, mapdiv = leaflet_chart_video(data['latitude'],data['longitude'],
w.name)
else:
mapscript, mapdiv = interactive_chart(w.id,promember=1)
breadcrumbs = [
{
@@ -218,8 +223,13 @@ def workout_video_create_view(request,id=0):
analysis = {'delay':delay}
if hascoordinates:
template = 'embedded_video.html'
else:
template = 'embedded_video_ote.html'
return render(request,
'embedded_video.html',
template,
{
'workout':w,
'rower':request.user.rower,