debug mode switched off.
authorJens-Uwe Grooss <j.-u.grooss@fz-juelich.de>
Fri, 11 Mar 2016 14:11:21 +0100
changeset 503f44e4855e8e5
parent 502 c5d6811b9630
child 504 e163180b5abe
debug mode switched off.
dates in uv map page menue entry replaced by last/next
eskp.py
     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)
Impressum Datenschutzerklärung