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

@@ -245,7 +245,7 @@ defaultfavoritecharts = (
'plottype':'line',
'workouttype':'both',
'reststrokes':True,
'notes':'Some Notes 1',
'notes':"""This chart shows your pace and stroke rate versus time. """,
},
{
'yparam1':'pace',
@@ -254,7 +254,9 @@ defaultfavoritecharts = (
'plottype':'line',
'workouttype':'both',
'reststrokes':True,
'notes':'Some Notes 2',
'notes':"""This chart shows your pace and heart rate versus time.
Heart rate values will be shown only when it is in your data, i.e.
in case you recorded your heart rate during your workout""",
},
{
'yparam1':'distanceperstroke',
@@ -263,7 +265,8 @@ defaultfavoritecharts = (
'plottype':'line',
'workouttype':'otw',
'reststrokes':True,
'notes':'Some Notes 3',
'notes':"""This chart shows the Distance covered per stroke, and your
heart rate versus time. """,
},
{
'yparam1':'strokeenergy',
@@ -272,16 +275,20 @@ defaultfavoritecharts = (
'plottype':'line',
'workouttype':'ote',
'reststrokes':True,
'notes':'Some Notes 3',
'notes':"""This chart shows the Work per Stroke and your heart rate
plotted versus time. """,
},
{
'yparam1':'distanceperstroke',
'yparam2':'None',
'xparam':'spm',
'plottype':'line',
'plottype':'scatter',
'workouttype':'otw',
'reststrokes':True,
'notes':'Some Notes 4',
'notes':"""This chart shows the Distance per Stroke versus stroke
stroke rate. You should see a steady decline of the Distance per Stroke
as you increase stroke rate. Typical values are > 10m for steady state
dropping to 8m for race pace in the single.""",
},
{
'yparam1':'strokeenergy',
@@ -290,6 +297,7 @@ defaultfavoritecharts = (
'plottype':'line',
'workouttype':'ote',
'reststrokes':True,
'notes':'Some Notes 4',
'notes':"""This chart shows the Work per Stroke versus Stroke Rate.
This value should be fairly constant across all stroke rates.""",
},
)

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: