diff -r c5d6811b9630 -r f44e4855e8e5 eskp.py --- a/eskp.py Fri Mar 11 13:59:53 2016 +0100 +++ b/eskp.py Fri Mar 11 14:11:21 2016 +0100 @@ -108,16 +108,24 @@ dates = get_valid_dates(FILES) ndates = len(dates) ind = dates.index(date_show) + navitexts = [] if ind ==0 : chosendates = [dates[ind+1]] + navitexts.append('next ->') + elif ind >= ndates - 1: chosendates= [dates[ind-1]] + navitexts.append('<- prev') else: chosendates = [dates[ind-1], dates[ind+1]] + navitexts.append('<- prev') + navitexts.append('next ->') menue = [] - for date in chosendates: - text_date = date[-2:] + '.' + date[-4:-2] + '.' - menue.append(('/ozoneloss/uvmap/' + date, _(text_date))) + + for i in range(len(chosendates)): + date = chosendates[i] + navitext = navitexts[i] + menue.append(('/ozoneloss/uvmap/' + date, _(navitext))) return menue @@ -342,4 +350,4 @@ if __name__ == "__main__": - app.run(host='localhost', port=5014, debug=True) + app.run(host='localhost', port=5014)