Changeset f89b2f1 in OpenWorkouts-current for ow/models/workout.py
- Timestamp:
- Jul 18, 2019, 1:11:40 PM (5 years ago)
- Branches:
- current
- Children:
- c82fe79
- Parents:
- e57b2df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ow/models/workout.py
re57b2df rf89b2f1 280 280 self.duration = timedelta(seconds=track.get_duration()) 281 281 # length_3d returns meters 282 self.distance = Decimal(track.length_3d()) / Decimal(1000.00) 282 self.distance = round( 283 Decimal(track.length_3d()) / Decimal(1000.00), 2) 283 284 ud = track.get_uphill_downhill() 284 self.uphill = Decimal(ud.uphill)285 self.downhill = Decimal(ud.downhill)285 self.uphill = round(Decimal(ud.uphill), 0) 286 self.downhill = round(Decimal(ud.downhill), 0) 286 287 # If the user did not provide us with a title, and the gpx has 287 288 # one, use that
Note: See TracChangeset
for help on using the changeset viewer.