Private
Public Access
1
0

understands interval string when defining workout

This commit is contained in:
Sander Roosendaal
2021-02-12 16:46:44 +01:00
parent daa92ee3e4
commit 69d3d1e46d
5 changed files with 195 additions and 3 deletions

View File

@@ -2275,6 +2275,11 @@ class PlannedSession(models.Model):
is_template = models.BooleanField(default=False)
fitfile = models.CharField(default=None,max_length=150,blank=True,null=True)
json_string = models.TextField(max_length=1000,default=None,blank=True,null=True)
interval_string = models.TextField(max_length=1000,default=None,blank=True,null=True,
verbose_name='Interval String (optional)')
def __str__(self):
name = self.name
@@ -2493,6 +2498,7 @@ class PlannedSessionForm(ModelForm):
'sessionunit',
'course',
'comment',
'interval_string'
]
dateTimeOptions = {
@@ -2505,6 +2511,7 @@ class PlannedSessionForm(ModelForm):
'startdate': AdminDateWidget(),
'enddate': AdminDateWidget(),
'preferreddate': AdminDateWidget(),
'interval_string': forms.Textarea(attrs={'rows':2,'cols':50})
}
def __init__(self,*args,**kwargs):
@@ -4330,6 +4337,7 @@ class PlannedSessionComment(models.Model):
user = models.ForeignKey(User,on_delete=models.PROTECT)
plannedsession = models.ForeignKey(PlannedSession,on_delete=models.CASCADE)
def __str__(self):
return u'Comment to: {w} by {u1} {u2}'.format(
w=self.workout,