Add next,prev month to view model for user workout calendar

This commit is contained in:
Peter Stockings
2023-10-13 17:01:02 +11:00
parent c7598f970d
commit 1dccd85711

7
app.py
View File

@@ -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 = {