usersmooth
This commit is contained in:
@@ -84,6 +84,14 @@ favanalysischoices = (
|
||||
('cp','Critical Power'),
|
||||
)
|
||||
|
||||
smoothingchoices = (
|
||||
(1,1),
|
||||
(2,2),
|
||||
(4,4),
|
||||
(8,8),
|
||||
(16,16),
|
||||
)
|
||||
|
||||
def half_year_from_now():
|
||||
return (datetime.datetime.now(tz=timezone.utc)+timezone.timedelta(days=182)).date()
|
||||
|
||||
@@ -991,6 +999,9 @@ class Rower(models.Model):
|
||||
max_length=100,
|
||||
verbose_name='Favorite Analysis')
|
||||
|
||||
usersmooth = models.IntegerField(default=1,choices=smoothingchoices,
|
||||
verbose_name="Chart Smoothing")
|
||||
|
||||
staticchartonupload = models.CharField(default='None',choices=plotchoices,
|
||||
max_length=100,
|
||||
verbose_name='Generate a static chart automatically on upload')
|
||||
@@ -3778,6 +3789,7 @@ class AccountRowerForm(ModelForm):
|
||||
'getimportantemails',
|
||||
'defaulttimezone','showfavoritechartnotes',
|
||||
'fav_analysis',
|
||||
'usersmooth',
|
||||
'defaultlandingpage',
|
||||
'offercoaching','autojoin','emailalternatives']
|
||||
|
||||
@@ -3817,7 +3829,7 @@ class AccountRowerForm(ModelForm):
|
||||
class StaticChartRowerForm(ModelForm):
|
||||
class Meta:
|
||||
model = Rower
|
||||
fields = ['staticgrids','slowpaceerg','fastpaceerg','slowpaceotw','fastpaceotw','staticchartonupload','fav_analysis']
|
||||
fields = ['usersmooth','staticgrids','slowpaceerg','fastpaceerg','slowpaceotw','fastpaceotw','staticchartonupload','fav_analysis']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(StaticChartRowerForm, self).__init__(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user