diff --git a/rowers/models.py b/rowers/models.py index 43c2c3ff..1e6e9e00 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -74,6 +74,16 @@ timezones = ( (x,x) for x in pytz.common_timezones ) +favanalysischoices = ( + ('compare','Compare'), + ('flexall','Cumulative Flex Chart'), + ('histogram','Histogram'), + ('stats','Statistics'), + ('boxplot','Box Chart'), + ('trendflex','Trend Flex'), + ('cp','Critical Power'), +) + def half_year_from_now(): return (datetime.datetime.now(tz=timezone.utc)+timezone.timedelta(days=182)).date() @@ -977,6 +987,10 @@ class Rower(models.Model): slowpaceotw = models.DurationField(default=otwpaceslow,verbose_name='Slowest OTW Pace') fastpaceotw = models.DurationField(default=otwpacefast,verbose_name='Fastest OTW Pace') + fav_analysis = models.CharField(default='compare',choices=favanalysischoices, + max_length=100, + verbose_name='Favorite Analysis') + staticchartonupload = models.CharField(default='None',choices=plotchoices, max_length=100, verbose_name='Generate a static chart automatically on upload') @@ -3763,6 +3777,7 @@ class AccountRowerForm(ModelForm): 'getemailnotifications', 'getimportantemails', 'defaulttimezone','showfavoritechartnotes', + 'fav_analysis', 'defaultlandingpage', 'offercoaching','autojoin','emailalternatives'] @@ -3802,7 +3817,7 @@ class AccountRowerForm(ModelForm): class StaticChartRowerForm(ModelForm): class Meta: model = Rower - fields = ['staticgrids','slowpaceerg','fastpaceerg','slowpaceotw','fastpaceotw','staticchartonupload'] + fields = ['staticgrids','slowpaceerg','fastpaceerg','slowpaceotw','fastpaceotw','staticchartonupload','fav_analysis'] def __init__(self, *args, **kwargs): super(StaticChartRowerForm, self).__init__(*args, **kwargs) diff --git a/rowers/templates/list_workouts.html b/rowers/templates/list_workouts.html index 4a603cc0..69b39d1f 100644 --- a/rowers/templates/list_workouts.html +++ b/rowers/templates/list_workouts.html @@ -242,6 +242,13 @@   {% endif %} + + + + +