Move to top results as default page.
This commit is contained in:
parent
8007a3690c
commit
688c2d1374
@ -10,8 +10,6 @@ app = Flask(__name__)
|
|||||||
PAGE_SIZE=20
|
PAGE_SIZE=20
|
||||||
MIN_MONTHS_FOR_LISTINGS=3
|
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')
|
@app.template_filter('urlescape')
|
||||||
def urlescape(string):
|
def urlescape(string):
|
||||||
if string is None:
|
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):
|
def list(title=None, year=None):
|
||||||
''' Set defaults for the index page '''
|
''' Set defaults for the index page '''
|
||||||
if year is None and title is None:
|
if year is None and title is None:
|
||||||
year = now().year
|
#year = now().year
|
||||||
title = 'runners'
|
title = 'top'
|
||||||
title = urllib.parse.unquote_plus(title)
|
title = urllib.parse.unquote_plus(title)
|
||||||
if title not in ( 'races', 'top', 'rankings', 'runners', 'licence', ):
|
if title not in ( 'races', 'top', 'rankings', 'runners', 'licence', ):
|
||||||
abort(404)
|
abort(404)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<nav class="tabs">
|
<nav class="tabs">
|
||||||
|
<span><a href="{{ url_for('list', title='top', year=None, start=None, show=ns.show) }}">Top Results</a></span>
|
||||||
<span><a href="{{ url_for('list', title='runners', year=now|year, start=None, show=ns.show) }}">Runners</a></span>
|
<span><a href="{{ url_for('list', title='runners', year=now|year, start=None, show=ns.show) }}">Runners</a></span>
|
||||||
<!--span><a href="{{ url_for('list', title='rankings', year=now|year, start=None, show=ns.show) }}">Rankings</a></span-->
|
<!--span><a href="{{ url_for('list', title='rankings', year=now|year, start=None, show=ns.show) }}">Rankings</a></span-->
|
||||||
<span><a href="{{ url_for('list', title='top', year=None, start=None, show=ns.show) }}">Top Results</a></span>
|
|
||||||
<span><a href="{{ url_for('index', title=None, year=None, start=None, show=ns.show) }}">All Results</a></span>
|
<span><a href="{{ url_for('index', title=None, year=None, start=None, show=ns.show) }}">All Results</a></span>
|
||||||
<span><a href="{{ url_for('list', title='races', year=None, start=None, show=ns.show) }}">Races</a></span>
|
<span><a href="{{ url_for('list', title='races', year=None, start=None, show=ns.show) }}">Races</a></span>
|
||||||
<span><a href="{{ url_for('list', title='licence', year=now|year, start=None, show=ns.show) }}">Licences</a></span>
|
<span><a href="{{ url_for('list', title='licence', year=now|year, start=None, show=ns.show) }}">Licences</a></span>
|
||||||
|
Loading…
Reference in New Issue
Block a user