106 |
106 |
107 def get_o3lossuvmap_dates(date_show): |
107 def get_o3lossuvmap_dates(date_show): |
108 dates = get_valid_dates(FILES) |
108 dates = get_valid_dates(FILES) |
109 ndates = len(dates) |
109 ndates = len(dates) |
110 ind = dates.index(date_show) |
110 ind = dates.index(date_show) |
|
111 navitexts = [] |
111 if ind ==0 : |
112 if ind ==0 : |
112 chosendates = [dates[ind+1]] |
113 chosendates = [dates[ind+1]] |
|
114 navitexts.append('next ->') |
|
115 |
113 elif ind >= ndates - 1: |
116 elif ind >= ndates - 1: |
114 chosendates= [dates[ind-1]] |
117 chosendates= [dates[ind-1]] |
|
118 navitexts.append('<- prev') |
115 else: |
119 else: |
116 chosendates = [dates[ind-1], dates[ind+1]] |
120 chosendates = [dates[ind-1], dates[ind+1]] |
|
121 navitexts.append('<- prev') |
|
122 navitexts.append('next ->') |
117 menue = [] |
123 menue = [] |
118 for date in chosendates: |
124 |
119 text_date = date[-2:] + '.' + date[-4:-2] + '.' |
125 for i in range(len(chosendates)): |
120 menue.append(('/ozoneloss/uvmap/' + date, _(text_date))) |
126 date = chosendates[i] |
|
127 navitext = navitexts[i] |
|
128 menue.append(('/ozoneloss/uvmap/' + date, _(navitext))) |
121 return menue |
129 return menue |
122 |
130 |
123 |
131 |
124 def get_vpsc_dates(): |
132 def get_vpsc_dates(): |
125 menue = [ |
133 menue = [ |
340 info = _(u"This information is not available!") |
348 info = _(u"This information is not available!") |
341 return render_template("404.html", msg=msg, info=info) |
349 return render_template("404.html", msg=msg, info=info) |
342 |
350 |
343 |
351 |
344 if __name__ == "__main__": |
352 if __name__ == "__main__": |
345 app.run(host='localhost', port=5014, debug=True) |
353 app.run(host='localhost', port=5014) |