1.1 --- a/pymove3d.py Thu Jan 23 14:49:17 2014 +0100
1.2 +++ b/pymove3d.py Thu Jan 23 17:52:52 2014 +0100
1.3 @@ -20,13 +20,13 @@
1.4 app.config['BABEL_DEFAULT_LOCALE'] = 'de'
1.5
1.6
1.7 -def get_content(filename):
1.8 +def get_content(filename, settings=None):
1.9 content = u""
1.10 if os.path.isfile(filename):
1.11 with codecs.open(filename, 'r', 'utf-8') as f:
1.12 rst_data = f.read()
1.13 f.close()
1.14 - content = publish_parts(rst_data, writer_name='html')['html_body']
1.15 + content = publish_parts(rst_data, writer_name='html', settings_overwrite=settings)['html_body']
1.16 return content
1.17
1.18 def get_topmenue():
1.19 @@ -50,7 +50,7 @@
1.20 @app.route("/index")
1.21 def index():
1.22 saying, author = get_saying()
1.23 - return render_template("/index.html",
1.24 + return render_template("/index.html",
1.25 saying=saying,
1.26 author=author,
1.27 competition_info=_(u'About Competition'),
1.28 @@ -114,7 +114,10 @@
1.29 @app.route("/privacy")
1.30 def privacy():
1.31 filename = os.path.join("templates", get_locale(), "rst", "privacy.rst")
1.32 - content = get_content(filename)
1.33 + settings_overrides = {
1.34 + 'initial_header_level': 2,
1.35 + }
1.36 + content = get_content(filename, settings=settings_overrides)
1.37 return render_template("/content.html", act="privacy", content=content)
1.38
1.39 @app.route("/dates")
1.40 @@ -132,7 +135,7 @@
1.41
1.42 @app.errorhandler(404)
1.43 def page_not_found(e):
1.44 - msg = _(u"Url: %(url)s not found" , url=request.url)
1.45 + msg = _(u"Url: %(url)s not found", url=request.url)
1.46 info = _(u"This information is not available!")
1.47 return render_template("404.html", msg=msg, info=info)
1.48