add ids to workout for better lookup on the backend

This commit is contained in:
Trey t
2024-08-28 11:41:28 -05:00
parent 7383a1db26
commit bc1c566f4d
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ class Workout(models.Model):
estimated_time = models.FloatField(max_length=255, blank=True, null=True)
def __str__(self):
return self.name + " - " + self.description + " - by: " + str(self.registered_user.first_name) + " - on: " + str(self.created_at)
return str(self.id) + ": " + self.name + " - " + self.description + " - by: " + str(self.registered_user.first_name) + " - on: " + str(self.created_at)
class WorkoutExercise(models.Model):
created_at = models.DateTimeField(auto_now_add=True)