From 1dccd8571165f899e34ef7239f8c4e09aa7090b3 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Fri, 13 Oct 2023 17:01:02 +1100 Subject: [PATCH] Add next,prev month to view model for user workout calendar --- app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 5829298..bee7c23 100644 --- a/app.py +++ b/app.py @@ -378,9 +378,14 @@ def render_users_and_workouts(): for workout in [get_workout_for_date(monthly_workouts, single_date)] ] + next_month_date = current_date + relativedelta(months=1) + previous_month_date = current_date - relativedelta(months=1) + calendar_month = { 'month_year': current_date.strftime('%B, %Y'), - 'days_of_month': days_of_month + 'days_of_month': days_of_month, + 'next_month': next_month_date, + 'previous_month': previous_month_date, } user_data = {