- Timestamp:
- Jan 16, 2019, 12:57:09 PM (5 years ago)
- Branches:
- current, feature/docs, master
- Children:
- eaef731
- Parents:
- ad5759b
- Location:
- ow
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ow/models/workout.py
rad5759b re0e2c10 12 12 copy_blob, 13 13 create_blob, 14 mps_to_kmph 14 15 ) 15 16 … … 50 51 self.duration = kw.get('duration', None) # a timedelta object 51 52 self.distance = kw.get('distance', None) # kilometers, Decimal 53 self.speed = kw.get('speed', {}) 52 54 self.hr_min = kw.get('hr_min', None) # bpm, Decimal 53 55 self.hr_max = kw.get('hr_max', None) # bpm, Decimal … … 378 380 self.title = fit.name 379 381 382 if fit.data['max_speed']: 383 self.speed['max'] = mps_to_kmph(fit.data['max_speed']) 384 385 if fit.data['avg_speed']: 386 self.speed['avg'] = mps_to_kmph(fit.data['avg_speed']) 387 380 388 if fit.data['avg_hr']: 381 389 self.hr_avg = Decimal(fit.data['avg_hr']) -
ow/templates/workout.pt
rad5759b re0e2c10 87 87 <tal:c tal:content="context.rounded_distance"></tal:c> km 88 88 </li> 89 <li tal:condition="context.speed"> 90 <tal:t i18n:translate="">Speed:</tal:t> 91 <tal:t i18n:translate="">Avg.</tal:t> 92 <tal:c tal:content="round(context.speed['avg'], 1)"></tal:c> km/h | 93 <tal:t i18n:translate="">Max.</tal:t> 94 <tal:c tal:content="round(context.speed['max'], 1)"></tal:c> km/h 95 </li> 89 96 <li tal:condition="hr"> 90 97 <tal:t i18n:translate="">Heart Rate:</tal:t>
Note: See TracChangeset
for help on using the changeset viewer.