From ddc17455bb08c2a52accf6407a836cb04c1decd2 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sun, 6 Oct 2019 09:03:37 +0200 Subject: [PATCH 1/2] excluded duplicate workouts from work load calc --- rowers/plannedsessions.py | 2 +- rowers/stravastuff.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rowers/plannedsessions.py b/rowers/plannedsessions.py index 7687540f..a3f8f1a7 100644 --- a/rowers/plannedsessions.py +++ b/rowers/plannedsessions.py @@ -192,7 +192,7 @@ def get_execution_report(rower,startdate,enddate,plan=None): unmatchedworkouts = Workout.objects.filter( user=rower, plannedsession=None, - date__gte=mm.startdate,date__lte=mm.enddate) + date__gte=mm.startdate,date__lte=mm.enddate).exclude(duplicate=True) for w in unmatchedworkouts: if w.rscore != 0: actualscore += w.rscore diff --git a/rowers/stravastuff.py b/rowers/stravastuff.py index 0ea6ab5c..6c75da2c 100644 --- a/rowers/stravastuff.py +++ b/rowers/stravastuff.py @@ -441,7 +441,7 @@ def handle_stravaexport(f2,workoutname,stravatoken,description='', client = stravalib.Client(access_token=stravatoken) act = client.upload_activity(f2,'tcx.gz',name=workoutname) - + try: res = act.wait(poll_interval=5.0,timeout=30) message = 'Workout successfully synchronized to Strava' From 6a171513b934d534f2b263b685c79ebf81532c1c Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sat, 12 Oct 2019 16:53:11 +0200 Subject: [PATCH 2/2] attempting to speed up --- rowers/templates/course_edit_view.html | 8 ++ rowers/templates/course_replace.html | 8 ++ rowers/templates/course_view.html | 8 ++ rowers/templates/coursemap.html | 8 ++ rowers/templates/list_workouts.html | 5 +- rowers/templates/map_view.html | 6 ++ rowers/templates/plannedsessionview.html | 3 + rowers/templates/virtualevent.html | 6 ++ rowers/templates/virtualeventranking.html | 6 ++ rowers/templates/workout_form.html | 6 ++ rowers/templates/workout_view.html | 7 ++ rowsandall_app/settings.py | 4 +- static/css/bokeh-1.0.4.min.css | 1 + static/css/bokeh-widgets-1.0.4.min.css | 4 + templates/newbase.html | 119 +++++++++++----------- 15 files changed, 136 insertions(+), 63 deletions(-) create mode 100644 static/css/bokeh-1.0.4.min.css create mode 100644 static/css/bokeh-widgets-1.0.4.min.css diff --git a/rowers/templates/course_edit_view.html b/rowers/templates/course_edit_view.html index 436a07a7..797a2924 100644 --- a/rowers/templates/course_edit_view.html +++ b/rowers/templates/course_edit_view.html @@ -1,6 +1,13 @@ {% extends "newbase.html" %} {% load staticfiles %} {% load rowerfilters %} +{% load leaflet_tags %} + +{% block meta %} +{% leaflet_js %} +{% leaflet_css %} +{% endblock %} + {% block scripts %} {% include "monitorjobs.html" %} {% endblock %} @@ -8,6 +15,7 @@ {% block title %}{{ course.name }} {% endblock %} {% block og_title %}{{ course.name }} {% endblock %} {% block main %} +

{{ course.name }}