From 866a4123b427e0410554d456a19c20d0917f136c Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Thu, 2 Mar 2017 20:52:10 +0100 Subject: [PATCH 1/5] images on comment page --- rowers/views.py | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/rowers/views.py b/rowers/views.py index a025f86e..67715fb1 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -3692,13 +3692,27 @@ def workout_comment_view(request,id=0): return HttpResponseRedirect(url) form = WorkoutCommentForm() - - return render(request, - 'workout_comments.html', - {'workout':w, - 'comments':comments, - 'form':form, - }) + + g = GraphImage.objects.filter(workout=row).order_by("-creationdatetime") + + if (len(g)<=3): + return render(request, + 'workout_comments.html', + {'workout':w, + 'graphs1':g[0:3], + 'comments':comments, + 'form':form, + }) + else: + return render(request, + 'workout_comments.html', + {'workout':w, + 'graphs1':g[0:3], + 'graphs1':g[3:6], + 'comments':comments, + 'form':form, + }) + # The basic edit page @login_required() From 5e5cc36da06b940ee3453d2d87aff6258afd2165 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 3 Mar 2017 15:41:51 +0100 Subject: [PATCH 2/5] added effective drive length --- rowers/dataprep.py | 5 ++ rowers/forms.py | 2 +- rowers/interactiveplots.py | 93 +++++++------------ rowers/models.py | 4 +- rowers/templates/developers.html | 8 +- rowers/templates/flexchart3otw.html | 134 +++++++++------------------- rowers/views.py | 27 ++++-- 7 files changed, 109 insertions(+), 164 deletions(-) diff --git a/rowers/dataprep.py b/rowers/dataprep.py index 6d9a5cf3..1e36ace9 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -1020,7 +1020,10 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True, drivelength = arclength else: drivelength = driveenergy/(averageforce*4.44822) + slip = rowdatadf.ix[:,'slip'] + totalangle = finish-catch + effectiveangle = finish-wash-catch-slip if windowsize > 3 and windowsize
  • Advantages
      -
    • It may take up to five minutes for the workout to show up - on the site.
    • +
    • It's a simple process, which can be automated.
  • Disadvantages
      -
    • It's a simple process, which can be automated.
    • +
    • It may take up to five minutes for the workout to show up + on the site.
  • @@ -86,7 +86,7 @@
  • The API is not stable and not fully tested yet.
  • You need to register your app with us. We can revoke your permissions if you misuse them.
  • -
  • The first time user must grant permissions to your app.
  • +
  • The user user must grant permissions to your app.
  • You need to manage authorization tokens.
  • diff --git a/rowers/templates/flexchart3otw.html b/rowers/templates/flexchart3otw.html index 4697f3a7..923edcbb 100644 --- a/rowers/templates/flexchart3otw.html +++ b/rowers/templates/flexchart3otw.html @@ -51,41 +51,19 @@ @@ -93,38 +71,23 @@ -