cosmetic changes in training plan presentation
This commit is contained in:
@@ -17,11 +17,16 @@
|
|||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p>Plan length: {{ plan.duration }} days</p>
|
<p>Plan length: {{ plan.duration }} days</p>
|
||||||
|
{% if plan.description %}
|
||||||
<p>{{ plan.description }}</p>
|
<p>{{ plan.description }}</p>
|
||||||
<p>{{ plan.target }}</p>
|
{% endif %}
|
||||||
|
{% if plan.goal %}
|
||||||
<p>Goal: {{ plan.goal }}</p>
|
<p>Goal: {{ plan.goal }}</p>
|
||||||
<p>{{ plan.hoursperweek }} hours per week</p>
|
{% endif %}
|
||||||
<p>{{ plan.sessionsperweek }} sessions per week</p>
|
{% if plan.target %}
|
||||||
|
<p>What the plan will achieve: {{ plan.target }}</p>
|
||||||
|
{% endif %}
|
||||||
|
<p>Weekly volume: {{ plan.hoursperweek }} hours per week over {{ plan.sessionsperweek }} sessions.</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -15,10 +15,13 @@
|
|||||||
<p>Created by: {{ plan.owner.first_name }} {{ plan.owner.last_name }}</p>
|
<p>Created by: {{ plan.owner.first_name }} {{ plan.owner.last_name }}</p>
|
||||||
<p>Plan length: {{ plan.duration }} days</p>
|
<p>Plan length: {{ plan.duration }} days</p>
|
||||||
<p>{{ plan.description }}</p>
|
<p>{{ plan.description }}</p>
|
||||||
<p>{{ plan.target }}</p>
|
{% if plan.target %}
|
||||||
|
<p>What the plan will achieve: {{ plan.target }}</p>
|
||||||
|
{% endif %}
|
||||||
|
{% if plan.goal %}
|
||||||
<p>Goal: {{ plan.goal }}</p>
|
<p>Goal: {{ plan.goal }}</p>
|
||||||
<p>{{ plan.hoursperweek }} hours per week</p>
|
{% endif %}
|
||||||
<p>{{ plan.sessionsperweek }} sessoins per week</p>
|
<p>{{ plan.hoursperweek }} hours per week over {{ plan.sessionsperweek }} sessions</p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import requests
|
|||||||
|
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
|
|
||||||
|
import humanize
|
||||||
|
|
||||||
lbstoN = 4.44822
|
lbstoN = 4.44822
|
||||||
|
|
||||||
@@ -793,8 +794,9 @@ def step_to_string(step,short=False):
|
|||||||
unit = 'min'
|
unit = 'min'
|
||||||
value = step['durationValue']
|
value = step['durationValue']
|
||||||
if value/1000. >= 3600:
|
if value/1000. >= 3600:
|
||||||
unit = 'hour'
|
unit = 'h'
|
||||||
dd = timedelta(seconds=value/1000.)
|
dd = timedelta(seconds=value/1000.)
|
||||||
|
#duration = humanize.naturaldelta(dd, minimum_unit="seconds")
|
||||||
duration = '{v}'.format(v=str(dd))
|
duration = '{v}'.format(v=str(dd))
|
||||||
elif durationtype == 'Distance':
|
elif durationtype == 'Distance':
|
||||||
unit = 'm'
|
unit = 'm'
|
||||||
|
|||||||
Reference in New Issue
Block a user