From 49311a0f916d16b0814371cd8e9d781ad19ead46 Mon Sep 17 00:00:00 2001 From: lelo Date: Tue, 1 Apr 2025 04:27:59 +0000 Subject: [PATCH] fix top 20 --- analytics.py | 1 - templates/dashboard.html | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/analytics.py b/analytics.py index 805df9f..6c2a468 100644 --- a/analytics.py +++ b/analytics.py @@ -316,7 +316,6 @@ def dashboard(): location_data = location_data[:20] # Convert the top-files rows to a list of dictionaries - # (just for consistency in passing to template). rows = [dict(rel_path=r[0], access_count=r[1]) for r in rows] return render_template( diff --git a/templates/dashboard.html b/templates/dashboard.html index 2aa2175..375270a 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -151,8 +151,8 @@ {% for row in rows %} - {{ row[0] }} - {{ row[1] }} + {{ row.rel_path }} + {{ row.access_count }} {% else %}