adding meters
This commit is contained in:
@@ -3700,7 +3700,7 @@ class Workout(models.Model):
|
||||
elements = dict(
|
||||
date = self.date.strftime('%Y-%m-%d'),
|
||||
name = self.name,
|
||||
distance = str(self.distance),
|
||||
distance = str(self.distance)+'m',
|
||||
ownerfirst = self.user.user.first_name,
|
||||
ownerlast = self.user.user.last_name,
|
||||
duration = self.duration.strftime("%H:%M:%S"),
|
||||
@@ -3727,7 +3727,7 @@ class Workout(models.Model):
|
||||
|
||||
if self.workouttype not in ['water','rower']:
|
||||
try:
|
||||
stri = u'{date} {name} {distance}m {duration} {workouttype} {ownerfirst} {ownerlast}'.format(
|
||||
stri = u'{date} {name} {distance} {duration} {workouttype} {ownerfirst} {ownerlast}'.format(
|
||||
**elements
|
||||
)
|
||||
except ValueError:
|
||||
@@ -3736,7 +3736,7 @@ class Workout(models.Model):
|
||||
return "No workout"
|
||||
else:
|
||||
try:
|
||||
stri = u'{date} {name} {distance}m {duration} {workouttype} {boattype} {ownerfirst} {ownerlast}'.format(
|
||||
stri = u'{date} {name} {distance} {duration} {workouttype} {boattype} {ownerfirst} {ownerlast}'.format(
|
||||
**elements
|
||||
)
|
||||
except (ValueError, AttributeError):
|
||||
|
||||
Reference in New Issue
Block a user