Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2018-10-12 15:40:49 +02:00
parent f72335c49d
commit 3cfc620906
11 changed files with 700 additions and 298 deletions

View File

@@ -32,6 +32,34 @@ import courses
from rowers.tasks import handle_check_race_course
def get_todays_micro(plan):
thismicro = None
thismacro = TrainingMacroCycle.objects.filter(
plan=plan,
startdate__lte = date.today(),
enddate__gte = date.today()
)
if thismacro:
thismeso = TrainingMesoCycle.objects.filter(
plan=thismacro[0],
startdate__lte = date.today(),
enddate__gte = date.today()
)
if thismeso:
thismicro = TrainingMicroCycle.objects.filter(
plan=thismeso[0],
startdate__lte = date.today(),
enddate__gte = date.today()
)
if thismicro:
thismicro = thismicro[0]
return thismicro
# Low Level functions - to be called by higher level methods
def add_workouts_plannedsession(ws,ps,r):
result = 0