1.1 --- a/eskp.py Fri Mar 11 13:59:53 2016 +0100
1.2 +++ b/eskp.py Fri Mar 11 14:11:21 2016 +0100
1.3 @@ -108,16 +108,24 @@
1.4 dates = get_valid_dates(FILES)
1.5 ndates = len(dates)
1.6 ind = dates.index(date_show)
1.7 + navitexts = []
1.8 if ind ==0 :
1.9 chosendates = [dates[ind+1]]
1.10 + navitexts.append('next ->')
1.11 +
1.12 elif ind >= ndates - 1:
1.13 chosendates= [dates[ind-1]]
1.14 + navitexts.append('<- prev')
1.15 else:
1.16 chosendates = [dates[ind-1], dates[ind+1]]
1.17 + navitexts.append('<- prev')
1.18 + navitexts.append('next ->')
1.19 menue = []
1.20 - for date in chosendates:
1.21 - text_date = date[-2:] + '.' + date[-4:-2] + '.'
1.22 - menue.append(('/ozoneloss/uvmap/' + date, _(text_date)))
1.23 +
1.24 + for i in range(len(chosendates)):
1.25 + date = chosendates[i]
1.26 + navitext = navitexts[i]
1.27 + menue.append(('/ozoneloss/uvmap/' + date, _(navitext)))
1.28 return menue
1.29
1.30
1.31 @@ -342,4 +350,4 @@
1.32
1.33
1.34 if __name__ == "__main__":
1.35 - app.run(host='localhost', port=5014, debug=True)
1.36 + app.run(host='localhost', port=5014)