added reststrokes to favoritechart settings
This commit is contained in:
@@ -157,12 +157,15 @@ class FavoriteChart(models.Model):
|
||||
workouttype = models.CharField(max_length=50,choices=workouttypechoices,
|
||||
default='both',
|
||||
verbose_name='Workout Type')
|
||||
reststrokes = models.BooleanField(default=True,verbose_name="Incl. Rest")
|
||||
user = models.ForeignKey(Rower)
|
||||
|
||||
|
||||
class FavoriteForm(ModelForm):
|
||||
class Meta:
|
||||
model = FavoriteChart
|
||||
fields = ['xparam','yparam1','yparam2','plottype','workouttype']
|
||||
fields = ['xparam','yparam1','yparam2',
|
||||
'plottype','workouttype','reststrokes']
|
||||
|
||||
class BaseFavoriteFormSet(BaseFormSet):
|
||||
def clean(self):
|
||||
@@ -175,7 +178,8 @@ class BaseFavoriteFormSet(BaseFormSet):
|
||||
yparam1 = form.cleaned_data['yparam1']
|
||||
yparam2 = form.cleaned_data['yparam2']
|
||||
plottype = form.cleaned_data['plottype']
|
||||
|
||||
reststrokes = form.cleaned_data['reststrokes']
|
||||
|
||||
if not xparam:
|
||||
raise forms.ValidationError(
|
||||
'Must have x parameter.',
|
||||
|
||||
Reference in New Issue
Block a user