Private
Public Access
1
0

first version

This commit is contained in:
2025-04-13 17:28:51 +02:00
parent f56eee0d92
commit 9ef9138fc6
7 changed files with 147 additions and 3 deletions

View File

@@ -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,