eskp.py
changeset 257 e953d3dc48b7
parent 256 c9d4aa9ec58f
child 264 bdf11bb4cb98
equal deleted inserted replaced
256:c9d4aa9ec58f 257:e953d3dc48b7
    33         content = publish_parts(rst_data, writer_name='html', settings_overrides=overrides)['html_body']
    33         content = publish_parts(rst_data, writer_name='html', settings_overrides=overrides)['html_body']
    34     return content
    34     return content
    35 
    35 
    36 def get_topmenue():
    36 def get_topmenue():
    37     menue = [
    37     menue = [
    38 #            ('/', _(u'Startseite')),
       
    39              ('/ozoneloss', _(u'Ozoneloss')),
    38              ('/ozoneloss', _(u'Ozoneloss')),
    40              ('/eskp', _(u'ESKP')),
    39              ('/eskp', _(u'ESKP')),
    41              ('/iek-7', _(u'IEK-7')),
    40              ('/iek-7', _(u'IEK-7')),
    42             ]
    41             ]
    43     return menue
    42     return menue
    75     return render_template("/index.html",
    74     return render_template("/index.html",
    76                            eskp_info=_(u'About ESKP'),
    75                            eskp_info=_(u'About ESKP'),
    77                            )
    76                            )
    78 
    77 
    79 
    78 
    80 @app.route('/ozoneloss/clams/2014')
    79 @app.route('/ozoneloss/clams/<year>')
    81 def y2014():
    80 def ozoneloss_clams_year(year):
    82     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_clams.rst")
    81     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_clams.rst")
    83     content = get_content(filename)
    82     content = get_content(filename)
    84     return render_template("/ozoneloss_clams.html", act="ozoneloss/clams/2014", content=content, year=2014)
    83     return render_template("/ozoneloss_clams.html", act="ozoneloss/clams/%s" % year, content=content, year=year)
    85 
    84 
    86 @app.route('/ozoneloss/clams/2013')
       
    87 def y2013():
       
    88     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_clams.rst")
       
    89     content = get_content(filename)
       
    90     return render_template("/ozoneloss_clams.html", act="ozoneloss/clams/2013", content=content, year=2013)
       
    91 
    85 
    92 @app.route('/ozoneloss/clams/2012')
    86 @app.route('/ozoneloss/vpsc/<year>')
    93 def y2012():
    87 def ozoneloss_vspc_year(year):
    94     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_clams.rst")
       
    95     content = get_content(filename)
       
    96     return render_template("/ozoneloss_clams.html", act="ozoneloss/clams/2012", content=content, year=2012)
       
    97 
       
    98 @app.route('/ozoneloss/clams/2011')
       
    99 def y2011():
       
   100     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_clams.rst")
       
   101     content = get_content(filename)
       
   102     return render_template("/ozoneloss_clams.html", act="ozoneloss/clams/2011", content=content, year=2011)
       
   103 
       
   104 @app.route('/ozoneloss/clams/2010')
       
   105 def y2010():
       
   106     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_clams.rst")
       
   107     content = get_content(filename)
       
   108     return render_template("/ozoneloss_clams.html", act="ozoneloss/clams/2010", content=content, year=2010)
       
   109 
       
   110 @app.route('/ozoneloss/vpsc/2014')
       
   111 def y2014a():
       
   112     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
    88     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   113     content = get_content(filename)
    89     content = get_content(filename)
   114     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
    90     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
   115     explanation = get_content(filename)
    91     explanation = get_content(filename)
   116 
    92 
   117     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2014)
    93     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/%s" % year, content=content,
   118 
    94                            content_explanation=explanation, year=year)
   119 @app.route('/ozoneloss/vpsc/2013')
       
   120 def y2013a():
       
   121     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
       
   122     content = get_content(filename)
       
   123     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   124     explanation = get_content(filename)
       
   125 
       
   126     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2013)
       
   127 
       
   128 @app.route('/ozoneloss/vpsc/2012')
       
   129 def y2012a():
       
   130     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
       
   131     content = get_content(filename)
       
   132     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   133     explanation = get_content(filename)
       
   134 
       
   135     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2012)
       
   136 
       
   137 @app.route('/ozoneloss/vpsc/2011')
       
   138 def y2011a():
       
   139     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
       
   140     content = get_content(filename)
       
   141     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   142     explanation = get_content(filename)
       
   143 
       
   144     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2011)
       
   145 
       
   146 @app.route('/ozoneloss/vpsc/2010')
       
   147 def y2010a():
       
   148     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
       
   149     content = get_content(filename)
       
   150     filename = os.path.join("templates", get_locale(), "rst", "explanation_vpsc.rst")
       
   151     explanation = get_content(filename)
       
   152 
       
   153     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc/2014", content=content, content_explanation=explanation, year=2010)
       
   154 
    95 
   155 @app.route('/de')
    96 @app.route('/de')
   156 def de():
    97 def de():
   157     global LANGUAGE_SELECTED
    98     global LANGUAGE_SELECTED
   158     LANGUAGE_SELECTED = "de"
    99     LANGUAGE_SELECTED = "de"
   180     content = get_content(filename)
   121     content = get_content(filename)
   181     return render_template("/eskp.html", act="eskp", content=content)
   122     return render_template("/eskp.html", act="eskp", content=content)
   182 
   123 
   183 
   124 
   184 @app.route("/ozoneloss")
   125 @app.route("/ozoneloss")
   185 def task():
   126 def ozoneloss():
   186     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss.rst")
   127     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss.rst")
   187     content = get_content(filename)
   128     content = get_content(filename)
   188     return render_template("/ozoneloss.html", act="ozoneloss", content=content)
   129     return render_template("/ozoneloss.html", act="ozoneloss", content=content)
   189 
   130 
   190 @app.route("/ozoneloss/clams")
   131 @app.route("/ozoneloss/clams")
   191 def task1():
   132 def ozoneloss_clams():
   192     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_clams.rst")
   133     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_clams.rst")
   193     content = get_content(filename)
   134     content = get_content(filename)
   194     return render_template("/ozoneloss_clams.html", act="ozoneloss/clams", content=content)
   135     return render_template("/ozoneloss_clams.html", act="ozoneloss/clams", content=content)
   195 
   136 
   196 @app.route("/ozoneloss/vpsc")
   137 @app.route("/ozoneloss/vpsc")
   197 def task2():
   138 def ozoneloss_vspc():
   198     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   139     filename = os.path.join("templates", get_locale(), "rst", "ozoneloss_vpsc.rst")
   199     content = get_content(filename)
   140     content = get_content(filename)
   200     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc", content=content)
   141     return render_template("/ozoneloss_vpsc.html", act="ozoneloss/vpsc", content=content)
   201 
   142 
   202 @app.route("/iek-7")
   143 @app.route("/iek-7")
   203 def submission():
   144 def institute():
   204     filename = os.path.join("templates", get_locale(), "rst", "iek-7.rst")
   145     filename = os.path.join("templates", get_locale(), "rst", "iek-7.rst")
   205     content = get_content(filename)
   146     content = get_content(filename)
   206     return render_template("/iek-7.html", act="submission", content=content)
   147     return render_template("/iek-7.html", act="iek-7", content=content)
   207 
   148 
   208 
   149 
   209 @app.route("/imprint")
   150 @app.route("/imprint")
   210 def imprint():
   151 def imprint():
   211     filename = os.path.join("templates", get_locale(), "rst", "imprint.rst")
   152     filename = os.path.join("templates", get_locale(), "rst", "imprint.rst")
Impressum Datenschutzerklärung