wip
This commit is contained in:
@@ -39,10 +39,19 @@ class WorkoutExercise(models.Model):
|
||||
)
|
||||
weight = models.IntegerField(null=True, blank=True, max_length=4)
|
||||
reps = models.IntegerField(null=True, blank=True, max_length=4)
|
||||
duration = models.IntegerField(null=True, blank=True, max_length=4)
|
||||
|
||||
def __str__(self):
|
||||
return self.workout.name + " : " + self.exercise.name
|
||||
|
||||
def duration_audio(self):
|
||||
if self.duration is not None:
|
||||
return str(settings.MEDIA_URL) + "quantities_audio/" + "for_"+str(self.duration)+"_seconds.m4a"
|
||||
|
||||
def weight_audio(self):
|
||||
if self.weight is not None:
|
||||
return str(settings.MEDIA_URL) + "quantities_audio/" + "for_"+str(self.weight)+"_pounds.m4a"
|
||||
|
||||
class CompletedWorkout(models.Model):
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
Reference in New Issue
Block a user