Private
Public Access
1
0

more around default fav charts

This commit is contained in:
Sander Roosendaal
2017-10-12 12:37:33 +02:00
parent a226a957c8
commit 08b49b32bb
2 changed files with 26 additions and 9 deletions

View File

@@ -298,6 +298,10 @@ class Rower(models.Model):
defaulttimezone = models.CharField(default='UTC',max_length=100,
choices=timezones,
verbose_name='Default Time Zone')
# Show flex chart notes
showfavoritechartnotes = models.BooleanField(default=True,
verbose_name='Show Notes for Favorite Charts')
def __str__(self):
return self.user.username
@@ -353,7 +357,11 @@ class FavoriteForm(ModelForm):
class Meta:
model = FavoriteChart
fields = ['xparam','yparam1','yparam2',
'plottype','workouttype','reststrokes']
'plottype','workouttype','reststrokes','notes']
widgets = {
'notes': forms.Textarea,
}
# To generate favorite chart forms on the fly
class BaseFavoriteFormSet(BaseFormSet):
@@ -830,7 +838,8 @@ class RowerPowerZonesForm(ModelForm):
class AccountRowerForm(ModelForm):
class Meta:
model = Rower
fields = ['weightcategory','getemailnotifications','defaulttimezone']
fields = ['weightcategory','getemailnotifications',
'defaulttimezone','showfavoritechartnotes']
class UserForm(ModelForm):
class Meta: