From 688c2d137413559b9888b7072451dc77d3f698a2 Mon Sep 17 00:00:00 2001 From: Timothy Allen Date: Tue, 14 Aug 2018 11:15:34 +0200 Subject: [PATCH] Move to top results as default page. --- aacstats.py | 6 ++---- templates/tabs.html | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/aacstats.py b/aacstats.py index e344ef2..d9d3afa 100644 --- a/aacstats.py +++ b/aacstats.py @@ -10,8 +10,6 @@ app = Flask(__name__) PAGE_SIZE=20 MIN_MONTHS_FOR_LISTINGS=3 -# TODO: Replace rankings with top recent results: position, sexposition, or catposition < 10, sorted by event and date - @app.template_filter('urlescape') def urlescape(string): if string is None: @@ -227,8 +225,8 @@ def read_db(listing=None, event=None, person=None, licence=None, search=dict(), def list(title=None, year=None): ''' Set defaults for the index page ''' if year is None and title is None: - year = now().year - title = 'runners' + #year = now().year + title = 'top' title = urllib.parse.unquote_plus(title) if title not in ( 'races', 'top', 'rankings', 'runners', 'licence', ): abort(404) diff --git a/templates/tabs.html b/templates/tabs.html index 81e4a7c..4332d04 100644 --- a/templates/tabs.html +++ b/templates/tabs.html @@ -1,7 +1,7 @@