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