Video Analysis Metrics Form renders but is not processed
This commit is contained in:
@@ -24,7 +24,7 @@ import rowers.mytypes as mytypes
|
||||
import datetime
|
||||
from django.forms import formset_factory
|
||||
from rowers.utils import landingpages
|
||||
from rowers.metrics import axes
|
||||
from rowers.metrics import axes, metricsgroups,rowingmetrics
|
||||
from rowers.metrics import axlabels
|
||||
|
||||
formaxlabels = axlabels.copy()
|
||||
@@ -57,6 +57,21 @@ class VideoAnalysisCreateForm(forms.Form):
|
||||
url = forms.CharField(max_length=255,required=True,label='YouTube Video URL')
|
||||
delay = forms.IntegerField(initial=0,label='Delay (seconds)')
|
||||
|
||||
metricsdescriptions = {}
|
||||
for m in metricsgroups:
|
||||
metricsdescriptions[m] = m+' ('
|
||||
for name,d in rowingmetrics:
|
||||
if d['group']==m:
|
||||
metricsdescriptions[m]+=d['verbose_name']+', '
|
||||
metricsdescriptions[m]=metricsdescriptions[m][0:-2]+')'
|
||||
|
||||
metricsgroupschoices = ((m,metricsdescriptions[m]) for m in metricsgroups)
|
||||
|
||||
class VideoAnalysisMetricsForm(forms.Form):
|
||||
groups = forms.MultipleChoiceField(label='Metrics Groups',
|
||||
choices=metricsgroupschoices,
|
||||
widget=forms.CheckboxSelectMultiple,)
|
||||
|
||||
# BillingForm form
|
||||
class BillingForm(forms.Form):
|
||||
amount = FlexibleDecimalField(required=True,decimal_places=2,
|
||||
|
||||
Reference in New Issue
Block a user