This commit is contained in:
Trey t
2023-06-14 21:23:50 -05:00
parent 3da41c3352
commit f0a4b2f717
904 changed files with 85 additions and 31 deletions

View File

@@ -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)