first version
This commit is contained in:
@@ -34,6 +34,17 @@ from django.conf import settings
|
||||
|
||||
lbstoN = 4.44822
|
||||
|
||||
intensitymap = {
|
||||
0: "Active",
|
||||
1: "Rest",
|
||||
2: "Warmup",
|
||||
3: "Cooldown",
|
||||
4: "Recovery",
|
||||
5: "Interval",
|
||||
6: "Other",
|
||||
}
|
||||
|
||||
|
||||
landingpages = (
|
||||
('workout_view', 'Workout View'),
|
||||
('workout_edit_view', 'Edit View'),
|
||||
@@ -1363,6 +1374,10 @@ def step_to_string(step, short=False):
|
||||
unit=unit,
|
||||
)
|
||||
|
||||
if isinstance(intensity, int):
|
||||
intensity = intensitymap[intensity]
|
||||
|
||||
|
||||
if short and intensity.lower() in ['warmup', 'cooldown', 'rest']:
|
||||
s = '{intensity} {duration} {unit} {target} {repeat}'.format(
|
||||
intensity=intensity,
|
||||
|
||||
Reference in New Issue
Block a user