Changeset d7a9df5 in OpenWorkouts-current for ow/models/workout.py


Ignore:
Timestamp:
Feb 10, 2019, 8:28:44 AM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
e547af5
Parents:
6662a84
Message:

Done some improvements on the dashboard:

  • Remove hr/speed/cad info from the workouts list (too much info)
  • Added workout sport to the workouts list
  • Replaced full notes for each workout with a shortened/trimmed version (done this in the workouts list in the profile page too)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/models/workout.py

    r6662a84 rd7a9df5  
    11import os
     2import textwrap
    23from datetime import datetime, timedelta, timezone
    34from decimal import Decimal
     
    136137
    137138    @property
     139    def trimmed_notes(self):
     140        """
     141        Return a string with a reduced version of the full notes for this
     142        workout.
     143        """
     144        return textwrap.shorten(self.notes, width=225, placeholder=' ...')
     145
     146    @property
    138147    def has_hr(self):
    139148        """
Note: See TracChangeset for help on using the changeset viewer.