Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2021-06-04 08:22:34 +02:00
parent 4977a83308
commit eca2c68bdd
2 changed files with 12 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
{% load static %}
{% load rowerfilters %}
{% block title %}Rowsandall Training Plans{% endblock %}
{% block title %}Rowsandall Training Zones{% endblock %}
{% block main %}

View File

@@ -1076,6 +1076,17 @@ def trainingzones_view(request,userid=0,mode='rower',
zones = form.cleaned_data['zones']
date_agg = form.cleaned_data['dates']
if date_agg == 'week':
startdate = startdate - datetime.timedelta(days = startdate.weekday())
else:
startdate = startdate - datetime.timedelta(days = (startdate.day-1))
form = TrainingZonesForm(initial={
'startdate':startdate,
'enddate':enddate,
'zones':zones,
'dates':date_agg,
})
script = ''
div = get_call()