MVP in-stroke analysis comparison
This commit is contained in:
@@ -1852,6 +1852,19 @@ def instrokeanalysis_view(request, userid=0):
|
||||
|
||||
analyses = InStrokeAnalysis.objects.filter(rower=r).order_by("-date","-id")
|
||||
|
||||
script = ""
|
||||
div = ""
|
||||
|
||||
if request.method == 'POST':
|
||||
form = InStrokeMultipleCompareForm(request.POST)
|
||||
|
||||
if form.is_valid():
|
||||
cd = form.cleaned_data
|
||||
selected = cd['analyses']
|
||||
request.session['analyses'] = [a.id for a in selected]
|
||||
# now should redirect to analysis
|
||||
script, div = instroke_multi_interactive_chart(selected)
|
||||
|
||||
breadcrumbs = [
|
||||
{
|
||||
'url': '/rowers/analysis',
|
||||
@@ -1868,6 +1881,8 @@ def instrokeanalysis_view(request, userid=0):
|
||||
'breadcrumbs': breadcrumbs,
|
||||
'analyses': analyses,
|
||||
'rower': r,
|
||||
'the_script': script,
|
||||
'the_div': div,
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ from rowers.forms import (
|
||||
VideoAnalysisMetricsForm, SurveyForm, HistorySelectForm,
|
||||
StravaChartForm, FitnessFitForm, PerformanceManagerForm,
|
||||
TrainingPlanBillingForm, InstantPlanSelectForm,
|
||||
TrainingZonesForm, InstrokeForm
|
||||
TrainingZonesForm, InstrokeForm, InStrokeMultipleCompareForm
|
||||
)
|
||||
|
||||
from django.urls import reverse, reverse_lazy
|
||||
|
||||
Reference in New Issue
Block a user