diff --git a/logos/logofornk.psd b/logos/logofornk.psd new file mode 100644 index 00000000..f2ced586 Binary files /dev/null and b/logos/logofornk.psd differ diff --git a/logos/logofornk.xcf b/logos/logofornk.xcf index e9a1041f..a412cf93 100644 Binary files a/logos/logofornk.xcf and b/logos/logofornk.xcf differ diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 88f99d01..248545b1 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -178,36 +178,50 @@ def interactive_forcecurve(theworkouts): plot.add_layout(avf) - avflabel = Label(x=450,y=500,x_units='screen',y_units='screen', + peakflabel = Label(x=455,y=530,x_units='screen',y_units='screen', + text="Fpeak: {peakforceav:6.2f}".format(peakforceav=peakforceav), + background_fill_alpha=.7, + text_color='blue', + ) + + avflabel = Label(x=465,y=500,x_units='screen',y_units='screen', text="Favg: {averageforceav:6.2f}".format(averageforceav=averageforceav), background_fill_alpha=.7, text_color='blue', ) - catchlabel = Label(x=450,y=470,x_units='screen',y_units='screen', + catchlabel = Label(x=460,y=470,x_units='screen',y_units='screen', text="Catch: {catchav:6.2f}".format(catchav=catchav), background_fill_alpha=0.7, text_color='red', ) - finishlabel = Label(x=450,y=440,x_units='screen',y_units='screen', + peakforceanglelabel = Label(x=420,y=440,x_units='screen',y_units='screen', + text="Peak angle: {peakforceangleav:6.2f}".format(peakforceangleav=peakforceangleav), + background_fill_alpha=0.7, + text_color='red', + ) + + finishlabel = Label(x=455,y=410,x_units='screen',y_units='screen', text="Finish: {finishav:6.2f}".format(finishav=finishav), background_fill_alpha=0.7, text_color='red', ) - sliplabel = Label(x=450,y=410,x_units='screen',y_units='screen', + sliplabel = Label(x=470,y=380,x_units='screen',y_units='screen', text="Slip: {slipav:6.2f}".format(slipav=slipav), background_fill_alpha=0.7, text_color='red', ) - washlabel = Label(x=450,y=380,x_units='screen',y_units='screen', + washlabel = Label(x=460,y=350,x_units='screen',y_units='screen', text="Wash: {washav:6.2f}".format(washav=washav), background_fill_alpha=0.7, text_color='red', ) + plot.add_layout(peakflabel) + plot.add_layout(peakforceanglelabel) plot.add_layout(avflabel) plot.add_layout(catchlabel) plot.add_layout(sliplabel) @@ -234,6 +248,8 @@ def interactive_forcecurve(theworkouts): finishlabel=finishlabel, sliplabel=sliplabel, washlabel=washlabel, + peakflabel=peakflabel, + peakforceanglelabel=peakforceanglelabel, ), code=""" var data = source.data var data2 = source2.data @@ -300,6 +316,8 @@ def interactive_forcecurve(theworkouts): finishlabel.text = 'Finish: '+finishav.toFixed(2) sliplabel.text = 'Slip: '+slipav.toFixed(2) washlabel.text = 'Wash: '+washav.toFixed(2) + peakflabel.text = 'Fpeak: '+peakforceav.toFixed(2) + peakforceanglelabel.text = 'Peak angle: '+peakforceangleav.toFixed(2) source.trigger('change'); """) diff --git a/rowers/views.py b/rowers/views.py index 8a049797..79d3a137 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -3733,6 +3733,13 @@ def workout_upload_view(request,message=""): f2 = z.extract(z.namelist()[0],path='media/') fileformat = fileformat[2] os.remove(f_to_be_deleted) + + if fileformat == 'c2log': + message = "This C2 logbook summary does not contain stroke data. Please download the Export Stroke Data file from the workout details on the C2 logbook." + url = reverse(workout_upload_view, + args=[str(message)]) + response = HttpResponseRedirect(url) + return response if fileformat == 'unknown': message = "We couldn't recognize the file type"