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