From 270a291f055a63783c990310a50a806bbb00eaf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sun, 12 Nov 2023 07:50:12 +0100 Subject: [PATCH] Change stats years to 2000 up to current year --- games/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/games/views.py b/games/views.py index 25b13ee..7acc8db 100644 --- a/games/views.py +++ b/games/views.py @@ -32,7 +32,12 @@ def model_counts(request): def stats_dropdown_year_range(request): - return {"stats_dropdown_year_range": range(2018, 2024)} + result = { + "stats_dropdown_year_range": range( + datetime.now(ZoneInfo(settings.TIME_ZONE)).year, 1999, -1 + ) + } + return result def add_session(request, purchase_id=None):