-
-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPE (rate of perceived exertion) #479 #546
Conversation
I'll take a look when I'm back home later today |
wger/manager/helpers.py
Outdated
@@ -212,7 +212,7 @@ def get_reps_reprentation(setting, rep_unit): | |||
"Until Failure" unit | |||
""" | |||
if setting.repetition_unit_id != 2: | |||
reps = "{0} {1}".format(setting.reps, rep_unit).strip() | |||
reps = "{0} {1} ({2})".format(setting.reps, rep_unit, setting.rpe).strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add a bit more of logic here when there's no value selected. So instead of "3 × 4 (None) (10 kg)", "3 × 4 (10 kg)" or 3 × 4 (10 kg 2RiR)"
wger/manager/helpers.py
Outdated
@@ -285,7 +285,7 @@ def normalize_weight(setting): | |||
reps = get_reps_reprentation(setting, rep_unit) | |||
weight = normalize_weight(setting) | |||
if weight: | |||
reps += ' ({0} {1})'.format(weight, setting.weight_unit) | |||
reps += ' x {0} {1}'.format(weight, setting.weight_unit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
blank=True, | ||
null=True, | ||
choices=NUMBERS) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to rir (Reps In Reserve) instead? You can leave the options 4 to 1 in 0,5 steps. You can leave the field as Integer and make the second value in the touple a string.
Ping :) |
I have merged this manually and polished a couple of things, thanks for the work!! |
DecimalField needs to be resolved. Creating a DecimalField in Settings is validated with Integer. The issue is currently solved using IntegerField.