diff --git a/rowers/dataprep.py b/rowers/dataprep.py index 10448a58..b8a197f6 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -1349,18 +1349,13 @@ def new_workout_from_file(r, f2, # handle non-Painsled by converting it to painsled compatible CSV if (fileformat != 'csv'): - try: - f2, summary, oarlength, inboard, fileformat = handle_nonpainsled( - f2, - fileformat, - summary=summary - ) - if not f2: - message = 'Something went wrong' - return (0, message, '') - except Exception as e: - errorstring = str(sys.exc_info()[0]) - message = 'Something went wrong: ' + e.message + f2, summary, oarlength, inboard, fileformat = handle_nonpainsled( + f2, + fileformat, + summary=summary + ) + if not f2: + message = 'Something went wrong' return (0, message, '') dosummary = (fileformat != 'fit' and 'speedcoach2' not in fileformat) diff --git a/rowers/templates/trainingplan.html b/rowers/templates/trainingplan.html index 770f457b..09202a4e 100644 --- a/rowers/templates/trainingplan.html +++ b/rowers/templates/trainingplan.html @@ -10,12 +10,13 @@ function toggle(source) { checkboxes = document.querySelectorAll("input[type='checkbox']"); for (var i=0, n=checkboxes.length;i + +

Training Plan - {{ plan.name }}

This plan starts on {{ plan.startdate }} and ends on {{ plan.enddate }}. @@ -47,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 %}   @@ -114,7 +115,7 @@ {{ macrocycle.0.actualtrimp }} {% endif %} - {% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %} + {% if todays_date <= macrocycle.0.enddate %}   @@ -166,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' %}   @@ -235,7 +236,7 @@ {{ mesocycle.0.actualtrimp }} {% endif %} - {% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %} + {% if todays_date <= mesocycle.0.enddate %}   @@ -292,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' %}   @@ -365,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, diff --git a/static/css/styles2.css b/static/css/styles2.css index b20f26bd..9b7278d6 100644 --- a/static/css/styles2.css +++ b/static/css/styles2.css @@ -288,6 +288,8 @@ { /* icons */ font: normal normal normal 1.0em/1 FontAwesome; + font-family: "Font Awesome 5 Pro"; + font-weight: 900; font-size: inherit; text-rendering: auto; content: '\f0da';