summaryrefslogtreecommitdiffstats
path: root/app/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/app.py')
-rw-r--r--app/app.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/app.py b/app/app.py
index e3e45d9..da5dc8d 100644
--- a/app/app.py
+++ b/app/app.py
@@ -325,7 +325,7 @@ def logout():
@app.route('/')
def index():
- ws = week_start_from_str(None)
+ ws = week_start_from_str(request.args.get('week'))
dates = week_dates(ws)
uid = current_user.id if current_user.is_authenticated else 1
db = database.get_db()
@@ -345,6 +345,9 @@ def index():
stat_map=stat_map, meal_types=MEAL_TYPES,
cuisine_emoji=CUISINE_EMOJI_MAP,
today_str=date.today().isoformat(),
+ prev_week=(ws - timedelta(weeks=1)).isoformat(),
+ next_week=(ws + timedelta(weeks=1)).isoformat(),
+ is_current_week=(ws == week_start_from_str(None)),
)