Private
Public Access
1
0

better organized training plan page

This commit is contained in:
Sander Roosendaal
2018-09-16 11:53:32 +02:00
parent 306776aae4
commit 4a004a2dc6
3 changed files with 434 additions and 132 deletions

View File

@@ -9,12 +9,6 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<style>
#mypointer {
cursor: pointer;
}
</style>
<div class="grid_12"> <div class="grid_12">
<div class="grid_12 alpha"> <div class="grid_12 alpha">
<h1>Training Plan - {{ plan.name }}</h1> <h1>Training Plan - {{ plan.name }}</h1>
@@ -31,75 +25,29 @@
<h2>Micro Cycles</h2> <h2>Micro Cycles</h2>
</div> </div>
</div> </div>
<!-- Container for plan -->
<div class="grid_12 alpha"> <div class="grid_12 alpha">
{% now "Y-m-d" as todays_date %} {% now "Y-m-d" as todays_date %}
<!-- Macro Cycle for loop -->
{% for key,macrocycle in cycles.items %} {% for key,macrocycle in cycles.items %}
<!-- Container for Macro cycle -->
<div class="grid_12 alpha"> <div class="grid_12 alpha">
<!-- Macro Cycle -->
{% if macrocycle.0.type == 'filler' %} {% if macrocycle.0.type == 'filler' %}
<div class="grid_4 filler alpha"> <div class="grid_4 filler alpha">
{% else %} {% else %}
<div class="grid_4 palegreen alpha"> <div class="grid_4 palegreen alpha">
{% endif %} {% endif %}
<div class="padded"> <!-- Padding -->
<table width="100%">
<tr>
<th colspan="4">
{{ macrocycle.0.name }} ({{ macrocycle.0.startdate }} - {{ macrocycle.0.enddate }})
</th>
</tr>
<tr>
<td></td>
<td>dist (m)</td>
<td>t (min)</td>
<td>rScore</td>
<td>TRIMP</td>
</tr>
<tr>
<td>plan</td>
<td>{{ macrocycle.0.plandistance }}</td>
<td>{{ macrocycle.0.plantime }}</td>
<td>{{ maccrocycle.0.planrscore }}</td>
<td>{{ macrocycle.0.plantrimp }}</td>
</tr>
<tr>
<td>actual</td>
<td>{{ macrocycle.0.actualdistance }}</td>
<td>{{ macrocycle.0.actualtime }}</td>
<td>{{ macrocycle.0.actualrscore }}</td>
<td>{{ macrocycle.0.actualtrimp }}</td>
</tr>
{% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %}
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4">
<a href="/rowers/macrocycle/{{ macrocycle.0.id }}">edit</a>
/
<a href="/rowers/deletemacrocycle/{{ macrocycle.0.id }}">delete</a>
/
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="grid_8 alpha">
{% for key, mesocycle in macrocycle.1.items %}
{% if mesocycle.0.type == 'filler' %}
<div class="grid_4 filler alpha">
{% else %}
<div class="grid_4 lightsalmon alpha">
{% endif %}
<div class="padded"> <div class="padded">
<table width="100%"> <table width="100%">
<tr> <tr>
<th colspan="4"> <th colspan="4">
{{ mesocycle.0.name }} ({{ mesocycle.0.startdate }} - {{ mesocycle.0.enddate }}) {{ macrocycle.0.name }} ({{ macrocycle.0.startdate }} - {{ macrocycle.0.enddate }})
</th> </th>
</tr> </tr>
{% if mesocycle.0.plan.type == 'userdefined' %} {% if macrocycle.0.type == 'userdefined' %}
<tr> <tr>
<td></td> <td></td>
<td>dist (m)</td> <td>dist (m)</td>
@@ -109,51 +57,59 @@
</tr> </tr>
<tr> <tr>
<td>plan</td> <td>plan</td>
<td>{{ mesocycle.0.plandistance }}</td> <td>{{ macrocycle.0.plandistance }}</td>
<td>{{ mesocycle.0.plantime }}</td> <td>{{ macrocycle.0.plantime }}</td>
<td>{{ mesocycle.0.planrscore }}</td> <td>{{ maccrocycle.0.planrscore }}</td>
<td>{{ mesocycle.0.plantrimp }}</td> <td>{{ macrocycle.0.plantrimp }}</td>
</tr> </tr>
<tr> <tr>
<td>actual</td> <td>actual</td>
<td>{{ mesocycle.0.actualdistance }}</td> <td>{{ macrocycle.0.actualdistance }}</td>
<td>{{ mesocycle.0.actualtime }}</td> <td>{{ macrocycle.0.actualtime }}</td>
<td>{{ mesocycle.0.actualrscore }}</td> <td>{{ macrocycle.0.actualrscore }}</td>
<td>{{ mesocycle.0.actualtrimp }}</td> <td>{{ macrocycle.0.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %}
<tr>
<td>&nbsp;</td>
</tr> </tr>
{% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %}
<tr>
<td>&nbsp;</td>
</tr>
<tr> <tr>
<td colspan="4"> <td colspan="4">
<a href="/rowers/mesocycle/{{ mesocycle.0.id }}">edit</a> <a href="/rowers/macrocycle/{{ macrocycle.0.id }}">edit</a>
/ /
<a href="/rowers/deletemesocycle/{{ mesocycle.0.id }}">delete</a> <a href="/rowers/deletemacrocycle/{{ macrocycle.0.id }}">delete</a>
/ /
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a> <a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% endif %} </table>
</table>
</div> </div>
<!-- End Padding -->
</div> </div>
<div class="grid_4 omega"> <!-- End Macro Cycle -->
{% for microcycle in mesocycle.1 %} <!-- Meso Cycle Container -->
{% if microcycle.type == 'filler' %} <div class="grid_8 alpha">
<div class="grid_4 filler"> <!-- Meso Cycle For Loop -->
{% else %} {% for key, mesocycle in macrocycle.1.items %}
<div class="grid_4 paleblue "> <!-- Meso Cycle plus its Micro Cycles -->
{% endif %} <div class="grid_8 alpha">
<div class="padded"> <!-- Meso Cycle -->
{% if mesocycle.0.type == 'filler' %}
<div class="grid_4 filler alpha">
{% else %}
<div class="grid_4 lightsalmon alpha">
{% endif %}
<!-- Meso Cycle Padding -->
<div class="padded alpha">
<table width="100%"> <table width="100%">
<tr> <tr>
<th colspan="4"> <th colspan="4">
{{ microcycle.name }} ({{ microcycle.startdate }} - {{ microcycle.enddate }}) {{ mesocycle.0.name }} ({{ mesocycle.0.startdate }} - {{ mesocycle.0.enddate }})
</th> </th>
</tr> </tr>
{% if microcycle.plan.type == 'userdefined' %} {% if mesocycle.0.type == 'userdefined' %}
<tr> <tr>
<td></td> <td></td>
<td>dist (m)</td> <td>dist (m)</td>
@@ -163,59 +119,141 @@
</tr> </tr>
<tr> <tr>
<td>plan</td> <td>plan</td>
<td>{{ microcycle.plandistance }}</td> <td>{{ mesocycle.0.plandistance }}</td>
<td>{{ microcycle.plantime }}</td> <td>{{ mesocycle.0.plantime }}</td>
<td>{{ microcycle.planrscore }}</td> <td>{{ mesocycle.0.planrscore }}</td>
<td>{{ microcycle.plantrimp }}</td> <td>{{ mesocycle.0.plantrimp }}</td>
</tr> </tr>
<tr> <tr>
<td>actual</td> <td>actual</td>
<td>{{ microcycle.actualdistance }}</td> <td>{{ mesocycle.0.actualdistance }}</td>
<td>{{ microcycle.actualtime }}</td> <td>{{ mesocycle.0.actualtime }}</td>
<td>{{ microcycle.actualrscore }}</td> <td>{{ mesocycle.0.actualrscore }}</td>
<td>{{ microcycle.actualtrimp }}</td> <td>{{ mesocycle.0.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %}
{% if mesocycle.0.plan.type == 'userdefined' %}
<tr>
<td>&nbsp;</td>
</tr> </tr>
{% if todays_date <= microcycle.enddate|date:"Y-m-d" %}
<tr>
<td>&nbsp;</td>
</tr>
<tr> <tr>
<td colspan="4"> <td colspan="4">
<a href="/rowers/microcycle/{{ microcycle.id }}">edit</a> <a href="/rowers/mesocycle/{{ mesocycle.0.id }}">edit</a>
/ /
<a href="/rowers/deletemicrocycle/{{ microcycle.id }}">delete</a> <a href="/rowers/deletemesocycle/{{ mesocycle.0.id }}">delete</a>
/ /
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a> <a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% endif %} {% endif %}
</table> </table>
</div> </div>
<!-- End Meso Cycle Padding -->
</div> </div>
{% endfor %} <!-- End Meso Cycle -->
<!-- Container for Micro Cycle -->
<div class="grid_4 omega">
<!-- Micro Cycle For Loop -->
{% for microcycle in mesocycle.1 %}
<!-- Micro Cycle -->
{% if microcycle.type == 'filler' %}
<div class="grid_4 filler alpha">
{% else %}
<div class="grid_4 paleblue alpha">
{% endif %}
<!-- Micro Cycle Padding -->
<div class="padded">
<table width="100%">
<tr>
<th colspan="4">
{{ microcycle.name }} ({{ microcycle.startdate }} - {{ microcycle.enddate }})
</th>
</tr>
{% if microcycle.type == 'userdefined' %}
<tr>
<td></td>
<td>dist (m)</td>
<td>t (min)</td>
<td>rScore</td>
<td>TRIMP</td>
</tr>
<tr>
<td>plan</td>
<td>{{ microcycle.plandistance }}</td>
<td>{{ microcycle.plantime }}</td>
<td>{{ microcycle.planrscore }}</td>
<td>{{ microcycle.plantrimp }}</td>
</tr>
<tr>
<td>actual</td>
<td>{{ microcycle.actualdistance }}</td>
<td>{{ microcycle.actualtime }}</td>
<td>{{ microcycle.actualrscore }}</td>
<td>{{ microcycle.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= microcycle.enddate|date:"Y-m-d" %}
{% if microcycle.plan.type == 'userdefined' %}
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4">
<a href="/rowers/microcycle/{{ microcycle.id }}">edit</a>
/
<a href="/rowers/deletemicrocycle/{{ microcycle.id }}">delete</a>
/
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a>
</td>
</tr>
{% endif %}
{% endif %}
</table>
</div>
<!-- End Micro Cycle Padding -->
</div>
<!-- End Micro Cycle -->
{% endfor %}
<!-- End Micro Cycle For Loop -->
</div> </div>
<!-- End Container for Micro Cycle -->
</div>
<!-- Meso Cycle plus its Micro Cycles -->
{% endfor %} {% endfor %}
<!-- End Meso Cycle For Loop -->
</div> </div>
</div> <!-- End Meso Cycle Container -->
{% endfor %} </div>
</div> <!-- End Container for Macro Cycle -->
<div class="grid_12"> {% endfor %}
<p>Click on the plan cycles to edit their names, start and end dates. The gray "filler" <!-- End Macro Cycle for loop -->
cycles are generated, adjusted and deleted automatically to ensure the entire plan </div>
duration is covered with non-overlapping cycles. <!-- End Container for plan -->
Once you edit a filler cycle, it become a user-defined cycle, which cannot be deleted <div class="grid_12">
by the system.</p> <p>Click on the plan cycles to edit their names, start and end dates.
<p>Filler cycles which have a filler cycle as a parent cannot be edited The gray "filler"
or deleted. You have to edit the parent cycle first. The reason is cycles are generated, adjusted and deleted automatically to
that children of filler cycles are not safe. They are deleted when ensure the entire plan
their parent is deleted by the system.</p> duration is covered with non-overlapping cycles.
<p>Click on "Sessions" in the cycle of your interest to see details Once you edit a filler cycle, it become a user-defined
of the individual training sessions planned for this period.</p> cycle, which cannot be deleted
<p>A good way to organize the plan is to think of micro cycles as training weeks. Macro cycles by the system.</p>
are typically used to address specific phases of preparation and to indicate the racing <p>Filler cycles which have a filler cycle as a parent cannot be edited
season and may span several months. or deleted. You have to edit the parent cycle first. The reason is
Meso cycles can be used to group sequences of three to five light, medium and that children of filler cycles are not safe. They are deleted when
hard weeks. It is recommended to work from left to right, starting with the macro cycles.</p> their parent is deleted by the system.</p>
<p>Click on "Sessions" in the cycle of your interest to see details
of the individual training sessions planned for this period.</p>
<p>A good way to organize the plan is to think of micro
cycles as training weeks. Macro cycles
are typically used to address specific phases of preparation
and to indicate the racing
season and may span several months.
Meso cycles can be used to group sequences of three to five
light, medium and
hard weeks. It is recommended to work from left to right,
starting with the macro cycles.</p>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -0,0 +1,259 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Rowsandall Training Plans{% endblock %}
{% block scripts %}
{% endblock %}
{% block content %}
<div class="grid_12">
<div class="grid_12 alpha">
<h1>Training Plan - {{ plan.name }}</h1>
<p>This plan starts on {{ plan.startdate }} and ends on {{ plan.enddate }}. The training plan target is: {{ plan.target.name }} on {{ plan.target.date }}.</p>
<p><a href="/rowers/editplan/{{ plan.id }}">Edit the plan</a></p>
</div>
<div class="grid_4 alpha">
<h2>Macro Cycles</h2>
</div>
<div class="grid_4 alpha">
<h2>Meso Cycles</h2>
</div>
<div class="grid_4">
<h2>Micro Cycles</h2>
</div>
</div>
<!-- Container for plan -->
<div class="grid_12 alpha">
{% now "Y-m-d" as todays_date %}
<!-- Macro Cycle for loop -->
{% for key,macrocycle in cycles.items %}
<!-- Container for Macro cycle -->
<div class="grid_12 alpha">
<!-- Macro Cycle -->
{% if macrocycle.0.type == 'filler' %}
<div class="grid_4 filler alpha">
{% else %}
<div class="grid_4 palegreen alpha">
{% endif %}
<!-- Padding -->
<div class="padded">
<table width="100%">
<tr>
<th colspan="4">
{{ macrocycle.0.name }} ({{ macrocycle.0.startdate }} - {{ macrocycle.0.enddate }})
</th>
</tr>
{% if macrocycle.0.type == 'userdefined' %}
<tr>
<td></td>
<td>dist (m)</td>
<td>t (min)</td>
<td>rScore</td>
<td>TRIMP</td>
</tr>
<tr>
<td>plan</td>
<td>{{ macrocycle.0.plandistance }}</td>
<td>{{ macrocycle.0.plantime }}</td>
<td>{{ maccrocycle.0.planrscore }}</td>
<td>{{ macrocycle.0.plantrimp }}</td>
</tr>
<tr>
<td>actual</td>
<td>{{ macrocycle.0.actualdistance }}</td>
<td>{{ macrocycle.0.actualtime }}</td>
<td>{{ macrocycle.0.actualrscore }}</td>
<td>{{ macrocycle.0.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %}
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4">
<a href="/rowers/macrocycle/{{ macrocycle.0.id }}">edit</a>
/
<a href="/rowers/deletemacrocycle/{{ macrocycle.0.id }}">delete</a>
/
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</td>
</tr>
{% endif %}
</table>
</div>
<!-- End Padding -->
</div>
<!-- End Macro Cycle -->
<!-- Meso Cycle Container -->
<div class="grid_8 alpha">
<!-- Meso Cycle For Loop -->
{% for key, mesocycle in macrocycle.1.items %}
<!-- Meso Cycle plus its Micro Cycles -->
<div class="grid_8 alpha">
<!-- Meso Cycle -->
{% if mesocycle.0.type == 'filler' %}
<div class="grid_4 filler alpha">
{% else %}
<div class="grid_4 lightsalmon alpha">
{% endif %}
<!-- Meso Cycle Padding -->
<div class="padded alpha">
<table width="100%">
<tr>
<th colspan="4">
{{ mesocycle.0.name }} ({{ mesocycle.0.startdate }} - {{ mesocycle.0.enddate }})
</th>
</tr>
{% if mesocycle.0.type == 'userdefined' %}
<tr>
<td></td>
<td>dist (m)</td>
<td>t (min)</td>
<td>rScore</td>
<td>TRIMP</td>
</tr>
<tr>
<td>plan</td>
<td>{{ mesocycle.0.plandistance }}</td>
<td>{{ mesocycle.0.plantime }}</td>
<td>{{ mesocycle.0.planrscore }}</td>
<td>{{ mesocycle.0.plantrimp }}</td>
</tr>
<tr>
<td>actual</td>
<td>{{ mesocycle.0.actualdistance }}</td>
<td>{{ mesocycle.0.actualtime }}</td>
<td>{{ mesocycle.0.actualrscore }}</td>
<td>{{ mesocycle.0.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %}
{% if mesocycle.0.plan.type == 'userdefined' %}
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4">
<a href="/rowers/mesocycle/{{ mesocycle.0.id }}">edit</a>
/
<a href="/rowers/deletemesocycle/{{ mesocycle.0.id }}">delete</a>
/
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</td>
</tr>
{% endif %}
{% endif %}
</table>
</div>
<!-- End Meso Cycle Padding -->
</div>
<!-- End Meso Cycle -->
<!-- Container for Micro Cycle -->
<div class="grid_4 omega">
<!-- Micro Cycle For Loop -->
{% for microcycle in mesocycle.1 %}
<!-- Micro Cycle -->
{% if microcycle.type == 'filler' %}
<div class="grid_4 filler alpha">
{% else %}
<div class="grid_4 paleblue alpha">
{% endif %}
<!-- Micro Cycle Padding -->
<div class="padded">
<table width="100%">
<tr>
<th colspan="4">
{{ microcycle.name }} ({{ microcycle.startdate }} - {{ microcycle.enddate }})
</th>
</tr>
{% if microcycle.type == 'userdefined' %}
<tr>
<td></td>
<td>dist (m)</td>
<td>t (min)</td>
<td>rScore</td>
<td>TRIMP</td>
</tr>
<tr>
<td>plan</td>
<td>{{ microcycle.plandistance }}</td>
<td>{{ microcycle.plantime }}</td>
<td>{{ microcycle.planrscore }}</td>
<td>{{ microcycle.plantrimp }}</td>
</tr>
<tr>
<td>actual</td>
<td>{{ microcycle.actualdistance }}</td>
<td>{{ microcycle.actualtime }}</td>
<td>{{ microcycle.actualrscore }}</td>
<td>{{ microcycle.actualtrimp }}</td>
</tr>
{% endif %}
{% if todays_date <= microcycle.enddate|date:"Y-m-d" %}
{% if microcycle.plan.type == 'userdefined' %}
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4">
<a href="/rowers/microcycle/{{ microcycle.id }}">edit</a>
/
<a href="/rowers/deletemicrocycle/{{ microcycle.id }}">delete</a>
/
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a>
</td>
</tr>
{% endif %}
{% endif %}
</table>
</div>
<!-- End Micro Cycle Padding -->
</div>
<!-- End Micro Cycle -->
{% endfor %}
<!-- End Micro Cycle For Loop -->
</div>
<!-- End Container for Micro Cycle -->
</div>
<!-- Meso Cycle plus its Micro Cycles -->
{% endfor %}
<!-- End Meso Cycle For Loop -->
</div>
<!-- End Meso Cycle Container -->
</div>
<!-- End Container for Macro Cycle -->
{% endfor %}
<!-- End Macro Cycle for loop -->
</div>
<!-- End Container for plan -->
<div class="grid_12">
<p>Click on the plan cycles to edit their names, start and end dates.
The gray "filler"
cycles are generated, adjusted and deleted automatically to
ensure the entire plan
duration is covered with non-overlapping cycles.
Once you edit a filler cycle, it become a user-defined
cycle, which cannot be deleted
by the system.</p>
<p>Filler cycles which have a filler cycle as a parent cannot be edited
or deleted. You have to edit the parent cycle first. The reason is
that children of filler cycles are not safe. They are deleted when
their parent is deleted by the system.</p>
<p>Click on "Sessions" in the cycle of your interest to see details
of the individual training sessions planned for this period.</p>
<p>A good way to organize the plan is to think of micro
cycles as training weeks. Macro cycles
are typically used to address specific phases of preparation
and to indicate the racing
season and may span several months.
Meso cycles can be used to group sequences of three to five
light, medium and
hard weeks. It is recommended to work from left to right,
starting with the macro cycles.</p>
</div>
{% endblock %}

View File

@@ -14416,7 +14416,7 @@ class TrainingPlanDelete(DeleteView):
def get_object(self, *args, **kwargs): def get_object(self, *args, **kwargs):
obj = super(TrainingPlanDelete, self).get_object(*args, **kwargs) obj = super(TrainingPlanDelete, self).get_object(*args, **kwargs)
if not checkaccessuser(self.request.user,obj.plan.rower): if not checkaccessuser(self.request.user,obj.rower):
raise PermissionDenied('You are not allowed to delete this training plan') raise PermissionDenied('You are not allowed to delete this training plan')
return obj return obj
@@ -14493,7 +14493,9 @@ def rower_trainingplan_view(request,id=0):
raise PermissionDenied("Access denied") raise PermissionDenied("Access denied")
createmacrofillers(plan) createmacrofillers(plan)
macrocycles = TrainingMacroCycle.objects.filter(plan=plan).order_by("startdate") macrocycles = TrainingMacroCycle.objects.filter(
plan=plan,
type='userdefined').order_by("startdate")
r = plan.rower r = plan.rower
@@ -14510,10 +14512,11 @@ def rower_trainingplan_view(request,id=0):
m.actualtrimp = 0 m.actualtrimp = 0
mesocycles = TrainingMesoCycle.objects.filter(plan=m).order_by("startdate") mesocycles = TrainingMesoCycle.objects.filter(
plan=m,
type='userdefined').order_by("startdate")
for me in mesocycles: for me in mesocycles:
createmicrofillers(me)
me.plantime = 0 me.plantime = 0
me.actualtime = 0 me.actualtime = 0
me.plandistance = 0 me.plandistance = 0
@@ -14523,7 +14526,9 @@ def rower_trainingplan_view(request,id=0):
me.plantrimp = 0 me.plantrimp = 0
me.actualtrimp = 0 me.actualtrimp = 0
microcycles = TrainingMicroCycle.objects.filter(plan=me).order_by("startdate") microcycles = TrainingMicroCycle.objects.filter(
plan=me,
type='userdefined').order_by("startdate")
for mm in microcycles: for mm in microcycles:
sps = PlannedSession.objects.filter( sps = PlannedSession.objects.filter(