Private
Public Access
1
0

has "Make Ranking" on left panel workflow page

This commit is contained in:
Sander Roosendaal
2017-11-03 13:39:53 +01:00
parent e19b3631f1
commit 657e9e9cd0
5 changed files with 16 additions and 1 deletions

View File

@@ -527,6 +527,7 @@ def fetchcp(rower,theworkouts,table='cpdata'):
theids = [int(w.id) for w in theworkouts] theids = [int(w.id) for w in theworkouts]
columns = ['power','workoutid','time'] columns = ['power','workoutid','time']
df = getsmallrowdata_db(columns,ids=theids) df = getsmallrowdata_db(columns,ids=theids)
df.dropna(inplace=True,axis=0)
if df.empty: if df.empty:
avgpower2 = {} avgpower2 = {}
for id in theids: for id in theids:

View File

@@ -0,0 +1,6 @@
<div class="grid_2 alpha">
<p>
<a class="button gray small" href="/rowers/workout/{{ workout.id }}/updatecp">
Make Ranking Piece</a>
</p>
</div>

View File

@@ -79,6 +79,10 @@
<td>Four intervals of 6, 5, 3 and 3 minutes length, 3 minutes rest</td> <td>Four intervals of 6, 5, 3 and 3 minutes length, 3 minutes rest</td>
</tr> </tr>
<tr> <tr>
<td>8x500m/3:30min </td>
<td>8 times 500m with 3 minutes 30 seconds rest</td>
</tr>
<tr>
<td>4x(500m+500m)/5min</td><td>4 times 1km, but each km is reported as two 500m intervals without rest</td> <td>4x(500m+500m)/5min</td><td>4 times 1km, but each km is reported as two 500m intervals without rest</td>
</tr> </tr>
<tr> <tr>

View File

@@ -45,6 +45,7 @@ workflowleftpanel = (
('panel_editstream.html','Edit Stream Data'), ('panel_editstream.html','Edit Stream Data'),
('panel_otwpower.html','Run OTW Power Calculations'), ('panel_otwpower.html','Run OTW Power Calculations'),
('panel_mapview.html','Map'), ('panel_mapview.html','Map'),
('panel_ranking.html','Ranking View'),
) )
defaultleft = [ defaultleft = [

View File

@@ -3252,7 +3252,10 @@ def workout_update_cp_view(request,id=0):
dataprep.runcpupdate(r) dataprep.runcpupdate(r)
url = reverse(otwrankings_view) if row.workouttype in ('water','coastal'):
url = reverse(otwrankings_view)
else:
url = reverse(oterankings_view)
return HttpResponseRedirect(url) return HttpResponseRedirect(url)