From 935d521b4f60f2c3779f1a9a44006a5ef5ed59b9 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 10 May 2019 13:56:44 +0200 Subject: [PATCH] solves #478 --- rowers/templates/trainingplan.html | 12 ++++++------ rowers/views/planviews.py | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rowers/templates/trainingplan.html b/rowers/templates/trainingplan.html index 7927895c..09202a4e 100644 --- a/rowers/templates/trainingplan.html +++ b/rowers/templates/trainingplan.html @@ -48,7 +48,7 @@ {{ macrocycle.0.name }} ({{ macrocycle.0.startdate }} - {{ macrocycle.0.enddate }}) - {% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %} + {% if todays_date <= macrocycle.0.enddate %}   @@ -115,7 +115,7 @@ {{ macrocycle.0.actualtrimp }} {% endif %} - {% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %} + {% if todays_date <= macrocycle.0.enddate %}   @@ -167,7 +167,7 @@ Meso {{ mesocycle.0.name }} ({{ mesocycle.0.startdate }} - {{ mesocycle.0.enddate }}) - {% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %} + {% if todays_date <= mesocycle.0.enddate %} {% if mesocycle.0.plan.type == 'userdefined' %}   @@ -236,7 +236,7 @@ {{ mesocycle.0.actualtrimp }} {% endif %} - {% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %} + {% if todays_date <= mesocycle.0.enddate %}   @@ -293,7 +293,7 @@ Micro {{ microcycle.name }} ({{ microcycle.startdate }} - {{ microcycle.enddate }}) - {% if todays_date <= microcycle.enddate|date:"Y-m-d" %} + {% if todays_date <= microcycle.enddate %} {% if microcycle.plan.type == 'userdefined' %}   @@ -366,7 +366,7 @@ {{ microcycle.actualtrimp }} {% endif %} - {% if todays_date <= microcycle.enddate|date:"Y-m-d" %} + {% if todays_date <= microcycle.enddate %}   diff --git a/rowers/views/planviews.py b/rowers/views/planviews.py index d9073371..a455213c 100644 --- a/rowers/views/planviews.py +++ b/rowers/views/planviews.py @@ -2301,6 +2301,7 @@ def rower_trainingplan_view(request, return render(request,'trainingplan.html', { 'plan':plan, + 'todays_date': timezone.now().date(), 'active':'nav-plan', 'breadcrumbs':breadcrumbs, 'rower':r,